URL Encoder / Decoder

Updated July 2026

Encode text into a URL-safe form, decode percent-encoded strings back to plain text, or paste a full URL to break it into its protocol, host, path and query parameters. Everything runs privately in your browser.

URL encoding (percent-encoding) makes text safe to put in a URL — a space becomes %20 and & becomes %26. Paste text to encode it, paste an encoded string to decode it, or paste a full URL to break it into its parts.
Component escapes everything; URI keeps structural characters.
Output

URL parser

Protocol
Hostname
Port
Pathname
Hash
Params

How URL encoding works

A URL can only contain a limited set of characters. Letters, digits and a handful of symbols are allowed directly; everything else — spaces, accented letters, and characters that have a special meaning in a web address — must be percent-encoded. Each disallowed byte is written as a percent sign followed by its two-digit hexadecimal value, so a space becomes %20 and an ampersand becomes %26.

The reason matters: characters like &, ? and = are structural in a URL — they separate the query string and split it into key/value pairs. If a value legitimately contains one of them, it must be encoded so the browser does not mistake it for structure. That is the difference between encodeURIComponent, which escapes those characters because it is meant for a single value, and encodeURI, which leaves them alone because it is meant for a whole URL.

Worked example: the text name=John & Jane encoded with encodeURIComponent becomes name%3DJohn%20%26%20Jane. Decoding it with decodeURIComponent returns the original name=John & Jane. Encoding the same text with encodeURI instead gives name=John%20&%20Jane — the = and & stay intact because they are treated as URL structure.
CharacterNamePercent-encoding
(space)Space%20
&Ampersand%26
?Question mark%3F
#Hash / fragment%23
/Slash%2F
=Equals%3D

Reference note: encoding and decoding use the browser's built-in encodeURIComponent, encodeURI, decodeURIComponent and URL functions, which follow the UTF-8 percent-encoding rules of the URL standard.

Frequently asked questions

What is URL encoding?
URL encoding, also called percent-encoding, replaces characters that are unsafe or reserved in a URL with a percent sign and two hexadecimal digits — a space becomes %20 and an ampersand becomes %26 — so arbitrary text can sit safely inside a web address.
What is %20 / why are there percent signs in URLs?
A percent sign introduces an encoded byte. %20 is the encoded form of a space, since spaces are not allowed in URLs. The two characters after it are the hexadecimal value of the byte, so %26 is an ampersand and %3F is a question mark.
What's the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes a single value and escapes reserved characters like & ? = and /. encodeURI is for a whole URL and leaves those structural characters intact so the address still works. Use component for pieces and URI for complete URLs.
How do I decode a URL?
Set the mode to Decode and paste the encoded string. The tool runs decodeURIComponent, turning %20 back into spaces and %26 back into ampersands. A malformed percent sequence makes decoding fail, and the tool reports the error.
How do I read the query parameters of a URL?
Paste the full URL into the URL parser. It uses the browser's built-in URL API to split the address into protocol, hostname, port and pathname, and lists each query parameter as a decoded key and value.
Is my data uploaded?
No. All encoding, decoding and parsing happen entirely in your browser. Nothing you paste is sent to a server or stored anywhere — it is local only.
⚡ URL Encoder / Decoder — by larely ↗

Related tools

Word Frequency Counter

Find the most-used words and keyword density in any text.

Image to Base64 Converter

Encode an image to a Base64 data URI for HTML or CSS, in your browser.

What Is My Browser?

Detect your browser, OS, screen resolution, window size and more.

Chmod Calculator

Convert file permissions between octal , symbolic and the chmod command.

Password Strength Checker

Estimate password entropy and crack time, entirely in your browser.

UTM Link Builder

Build campaign tracking URLs with UTM parameters for Google Analytics.

Meta Tag Generator

Generate HTML meta, Open Graph and Twitter Card tags for any page.

HTTP Status Codes

Searchable reference of every HTTP status code and what it means.

Data Transfer Rate Converter

Convert between Mbps, MB/s, Gbps and more, with the bits-vs-bytes rule.

ASCII Table

Full ASCII table with decimal, hex, octal, binary and character lookup.

MIME Types

Look up the MIME type for any file extension.

Markdown Table Generator

Build a Markdown table with alignment and copy the syntax, in your browser.

Browse all 251 free tools →