Text Tools
Fancy Text
Calculators
Dev Tools
More
Blog Get the Chrome extension
Free · No sign-up · Nothing is uploaded

URL Encode / Decode: Text, Links and Query Strings

URL encode and decode as you type, in Component, Full URL or Form mode. Emoji and accents work, and nothing leaves your browser.

What to do

Mode

Result

Private by design. Everything runs in your browser and is never uploaded. A shared link carries your text in its address, so share it with care.

0 characters0 bytes (UTF-8)0 sequences
More options
Hex letters

JavaScript compatibility

On matches encodeURIComponent and encodeURI exactly: five marks stay unencoded in Component mode and square brackets are encoded in Full URL mode.

Existing percent sequences

Line breaks

Decode passes

Bytes when decoding

Parse a URL into its parts

Paste a link to split it into scheme, host, port, path, query parameters and fragment, with every value decoded.

The basics

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that are not allowed in a URL, or that have a special meaning there, with a percent sign and two hexadecimal digits. A space becomes %20, an ampersand becomes %26, and an accented letter such as é becomes %C3%A9. Decoding turns every sequence back into the original text.

The rules come from RFC 3986, and web browsers follow the WHATWG URL Standard. Text outside ASCII is first written as UTF-8 bytes, and each byte then gets its own %XX. To see those bytes as ones and zeros, try the binary translator.

The same text in the three modes
Text Component Full URL Form
hello world hello%20world hello%20world hello+world
a&b=c a%26b%3Dc a&b=c a%26b%3Dc
100% sure 100%25%20sure 100%25%20sure 100%25+sure
price=5+5 price%3D5%2B5 price=5+5 price%3D5%2B5
~tilde ~tilde ~tilde %7Etilde
café caf%C3%A9 caf%C3%A9 caf%C3%A9
https://example.com/a b?x=1 https%3A%2F%2Fexample.com%2Fa%20b%3Fx%3D1 https://example.com/a%20b?x=1 https%3A%2F%2Fexample.com%2Fa+b%3Fx%3D1
emoji 😀 emoji%20%F0%9F%98%80 emoji%20%F0%9F%98%80 emoji+%F0%9F%98%80
How it works

How to URL encode and decode text

Four steps, and the result updates as you type.

01

Paste or type

Put text in the left box. With Auto-detect on, text that contains %XX sequences and no spaces is decoded, and anything else is encoded. Pick Encode or Decode to override it.

02

Choose a mode

Component encodes everything except letters, digits and – . _ ~ . Full URL keeps characters such as : / ? # & =. Form writes a space as + and reads + as a space.

03

Read the notes

Yellow notes appear when something looks wrong: text that is already encoded, a malformed % sequence, bytes that are not UTF-8, or a result that is still encoded. Each has a one-click fix.

04

Copy, share or parse

Copy the result, download it as a .txt file or copy a share link. To take a link apart, paste it into the parse panel and read every part and parameter decoded.

Reference

Common percent-encoded characters

What each character becomes, and whether the standard JavaScript functions and a form encoder leave it alone.

ASCII punctuation, space and line breaks
Character RFC 3986 class Component encodeURIComponent encodeURI Form
space not allowed %20 %20 %20 +
new line not allowed %0A %0A %0A %0A
tab not allowed %09 %09 %09 %09
! sub-delim %21 kept kept %21
" not allowed %22 %22 %22 %22
# gen-delim %23 %23 kept %23
$ sub-delim %24 %24 kept %24
% escape character %25 %25 %25 %25
& sub-delim %26 %26 kept %26
' sub-delim %27 kept kept %27
( sub-delim %28 kept kept %28
) sub-delim %29 kept kept %29
* sub-delim %2A kept kept kept
+ sub-delim %2B %2B kept %2B
, sub-delim %2C %2C kept %2C
- unreserved kept kept kept kept
. unreserved kept kept kept kept
/ gen-delim %2F %2F kept %2F
: gen-delim %3A %3A kept %3A
; sub-delim %3B %3B kept %3B
< not allowed %3C %3C %3C %3C
= sub-delim %3D %3D kept %3D
> not allowed %3E %3E %3E %3E
? gen-delim %3F %3F kept %3F
@ gen-delim %40 %40 kept %40
[ gen-delim %5B %5B %5B %5B
backslash not allowed %5C %5C %5C %5C
] gen-delim %5D %5D %5D %5D
^ not allowed %5E %5E %5E %5E
_ unreserved kept kept kept kept
` not allowed %60 %60 %60 %60
{ not allowed %7B %7B %7B %7B
| not allowed %7C %7C %7C %7C
} not allowed %7D %7D %7D %7D
~ unreserved kept kept kept %7E
Characters outside ASCII are written as UTF-8 bytes
Character Code point UTF-8 bytes Percent-encoded
é (e with acute accent) U+00E9 C3 A9 %C3%A9
Ω (Greek capital omega) U+03A9 CE A9 %CE%A9
Ж (Cyrillic zhe) U+0416 D0 96 %D0%96
ع (Arabic ain) U+0639 D8 B9 %D8%B9
€ (euro sign) U+20AC E2 82 AC %E2%82%AC
日 (Chinese or Japanese sun) U+65E5 E6 97 A5 %E6%97%A5
😀 (grinning face) U+1F600 F0 9F 98 80 %F0%9F%98%80
Compared

Component, Full URL and Form encoding compared

The three modes differ in which characters they keep and how they write a space. The Form column follows the WHATWG URL Standard.

Which mode to use
Component Full URL Form
Rule it follows RFC 3986: only unreserved characters stay RFC 3986: unreserved and reserved characters stay WHATWG application/x-www-form-urlencoded
A space becomes %20 %20 +
Characters left as they are A-Z a-z 0-9 and - . _ ~ Those, plus : / ? # [ ] @ ! $ & ' ( ) * + , ; = A-Z a-z 0-9 and * - . _
Slash, question mark, ampersand, equals sign Encoded Kept Encoded
Tilde Kept Kept %7E
Plus sign when decoding Stays a plus sign Stays a plus sign Becomes a space
Best for One value, such as a search term or a path segment Repairing a whole link that contains spaces or accents HTML form data and query strings
JavaScript counterpart encodeURIComponent (it also leaves ! ' ( ) * alone) decodeURI and encodeURI (encodeURI also encodes [ ]) URLSearchParams
What this tool adds to a basic encoder box
Feature Here Why it helps
Three modes in one place Component, Full URL and Form You pick the right rule instead of fixing the output by hand.
Double-encoding check Warns before %20 becomes %2520, and can decode every layer in one click Most broken links come from encoding the same text twice.
Clear errors Shows where a malformed % sequence or invalid UTF-8 byte sits JavaScript only throws a URIError and stops.
URL parser Splits a link into parts, with every parameter decoded and a JSON copy You can read a long tracking link without counting characters.
Legacy text Latin-1 reading and lower-case hex Old systems write %E9 for é and use lower-case digits.
Live and private Updates as you type, runs in the browser Nothing you paste is uploaded.
Use cases

What people use a URL encoder and decoder for

Values in a query string

Encode a search term or a name before you put it after the question mark, so an ampersand, equals sign or hash inside it cannot split the parameter.

Redirect and return URLs

A link stored inside another link has to be encoded as a value. The parse panel decodes it and offers a Parse button, so you can open the inner URL in one click.

Tracking and analytics links

Paste a long link full of utm_ parameters and read each name and value decoded. Copy the lot as JSON, or compare two versions with the text compare tool.

API requests and curl

Encode path segments and query values before you call an API, and decode the values in a log to see what was really sent.

Links with spaces and accents

A link such as https://example.com/my file.pdf breaks when it is pasted into chat. Full URL mode adds the %20 and leaves the rest of the address alone.

Debugging bad data

Trace a 400 error, a URIError or a value that shows %2520 on screen. Keep a list of the cases in the online notepad while you work.

Good to know

Things worth knowing about percent-encoding

A few rules explain most surprises. If your input has stray line breaks or word-processor formatting, clean it first with the paragraph to single line converter or the remove text formatting tool.

  • Encode the parts, not the whole URL

    Colons, slashes, question marks and equals signs give a URL its shape. Encode a value on its own, then put it into the address.

  • Never encode or decode the same text twice

    RFC 3986 says implementations must not percent-encode or decode the same string more than once. Doing so turns %20 into %2520 or mixes up a real percent sign.

  • Hex digits can be either case

    %c3%a9 and %C3%A9 mean the same thing. The standard recommends upper case, which is the default here.

  • %20 and + are not interchangeable everywhere

    A plus sign stands for a space only in form data and query strings. In a path, a + is just a plus sign, so %20 is the safe choice.

  • A query can carry slashes and question marks

    RFC 3986 allows both characters as data in the query, which is why Full URL mode leaves them alone.

  • Encoding is not encryption

    Anyone can decode a percent-encoded string, so it does not hide a password or a token.

Limits

What this URL encoder does not do

It checks syntax, not the web

The parser shows what is in the text. It does not test that a link opens, follow redirects or fix a wrong address.

Domain names are different

Host names with accents or non-Latin letters are written in Punycode, such as xn--caf-dma, not with percent signs. The parse panel shows that ASCII form but the encoder leaves host names to you.

Large input is capped

To keep the page responsive, the tool converts the first 200,000 characters and shows the first 20,000 of the result. Copy and Download still include all of it, and a share link holds up to 1,500 characters.

Sources

Where the facts come from

The rules and character sets on this page come from these references.

FAQ

URL encoder and decoder FAQ

Short answers to what people ask most.

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that are not allowed in a URL, or that have a special meaning there, with a percent sign and two hexadecimal digits. A space becomes %20 and the letter e with an acute accent becomes %C3%A9.

How do I URL encode a string?

Type or paste the text into the left box and the encoded text appears on the right. Use Component mode for a single value such as a search term, and Full URL mode when you are repairing a whole link.

How do I decode a URL?

Paste the percent-encoded text and leave Auto-detect on, or choose Decode. Each %XX sequence is turned back into its byte and the bytes are read as UTF-8, so %C3%A9 becomes the letter e with an acute accent.

What is the difference between encodeURI and encodeURIComponent?

encodeURI keeps the characters that give a URL its structure, such as : / ? # & and =, while encodeURIComponent encodes them. Use encodeURIComponent for a value inside a URL and encodeURI for a complete address.

Should a space be %20 or +?

Use %20 in paths and in most places. A plus sign means a space only in form data, the application/x-www-form-urlencoded format used by HTML forms and many query strings, so Form mode writes + and the other two modes write %20.

Why does a plus sign stay a plus sign when I decode?

In Component and Full URL decoding a + is an ordinary character. It turns into a space only in form data, so switch to Form mode when you decode a query string. The tool offers that switch when it sees a + in the text.

Why does my decoded text still contain %20 or %25?

The text was probably encoded twice. Encoding a string that already contains %20 turns the percent sign into %25 and gives %2520. This tool flags it and can decode every layer in one click.

What is a malformed percent sequence?

It is a percent sign that is not followed by two hexadecimal digits, such as %zz or a % at the end of the text. This tool leaves it as typed and points to its position, while JavaScript decodeURIComponent throws a URIError for the same input.

Which characters are never percent-encoded?

RFC 3986 calls letters, digits, hyphen, period, underscore and tilde unreserved, so they never need encoding. In Component mode every other character is encoded, including reserved characters used as data.

How are emoji and non-English text encoded?

They are first converted to UTF-8 bytes, and each byte is written as %XX. The grinning face emoji U+1F600 becomes %F0%9F%98%80 and the Greek capital omega becomes %CE%A9.

How do I get the parameters out of a URL?

Paste the link into the Parse a URL panel. It lists the scheme, host, port, path, each query parameter with its decoded name and value, and the fragment, and it can copy the parameters as JSON.

Is my text uploaded or stored?

No. The conversion runs in your browser and nothing you type is sent to a server. A share link carries your text in its address, so share it only with people who may read it.