Free Tools · by The Cited Brand
100% FREE · NO SIGN-UP · NOTHING LEAVES YOUR BROWSER

Encode the URL

Encode the URL in one click — a value, a whole address, or form data — and decode it back again. Four modes, a per-character breakdown that shows exactly what changed and why, double-encoding warnings, and a query-string builder. Free, in your browser. Nothing is uploaded or stored.

URL Encoder & Decoder

Paste text or a URL and the result appears as you type. Pick the direction and the mode — the breakdown below shows every character that changed and why.

0 characters 0 UTF-8 bytes

Mode — pick the one that matches what you are encoding

Component is the default: one value going into a URL — a query value, a path segment, a slug.

Result

0 characters 0 UTF-8 bytes

Build a query string

Add parameters one by one — each value is encoded separately, so an & or = inside a value cannot break the URL. Or add the three UTM fields for a campaign link.

Ready-to-use URL

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters a URL cannot safely carry with a % sign followed by two hex digits — the byte value of the character. A space becomes %20, an ampersand becomes %26, and the French é becomes %C3%A9 (its two UTF-8 bytes). It exists because URLs were designed for a tiny ASCII alphabet: anything outside it — spaces, accents, emoji, symbols with structural meaning — must be encoded so every server on the internet reads the URL the same way.

This tool does both directions live as you type, with four clearly labelled modes, a per-character breakdown that shows exactly why each byte was encoded, an integrated query-string parser, double-encoding detection, and honest, pinpointed errors when your input is malformed. Paste URLs with API keys or tokens without fear — nothing leaves your browser.

How to encode a URL (3 steps)

  1. Paste the text or URL. A search phrase, a value for a query parameter, or a whole address. The result appears as you type — there is no button to press.
  2. Pick the mode. Component for one value going into a URL, Full URL for a complete address, Form for data from an HTML form, Strict RFC 3986 for maximum safety. The wrong mode is the most common cause of broken links — see the table below.
  3. Copy the result. One click copies it, or download it as a .txt file. To go the other way, switch to Decode and paste the encoded string back.

Which mode should I use?

ModeUse whenLeaves unescaped
Component encodeURIComponentOne value inserted into a URL — query value, path segment, slug (default)A–Z a–z 0–9 - _ . ! ~ * ' ( )
Full URL encodeURIA complete, already-structured URLComponent set + ; / ? : @ & = + $ , #
Form application/x-www-form-urlencodedHTML form or query-string data — space becomes +A–Z a–z 0–9 * - . _
Strict RFC 3986Maximum safety — specs, signatures, OAuth flowsA–Z a–z 0–9 - . _ ~

The same URL looks different in each mode. For https://example.com/street/About us?q=Cheese#contact: Component encodes everything, including the slashes and the colon; Full URL keeps the structure and only encodes the space; Strict RFC 3986 encodes the same as Component plus ! ' ( ) *; Form turns the space into a +. Rule of thumb: whole URL → Full URL; each value you insert → Component.

The + pitfall: why plus means space in queries but not paths

This single character is the #1 source of URL encoding bugs. In a query string parsed as form data, + means space — so a literal plus must be sent as %2B, or C++ in a form query decodes as "C ". But in a path, + is a literal plus: /files/hello+world.txt is a file whose name contains plus signs. To make it worse, JavaScript's decodeURIComponent never converts + at all — you must replace it before decoding. This tool has a "Decode + as space" checkbox that does the replacement correctly, in the right order (a real %2B still survives as +), and the query parser has it on automatically because that is the only context where it applies.

What is double encoding? (%2520)

Double encoding is encoding an already-encoded string again. Since % itself encodes as %25, the sequence %20 becomes %2520. Decoding once gives %20 — still encoded, not a space. It happens when a framework auto-encodes a value you already encoded, or when redirects encode the same parameter on every hop. This tool warns you whenever it sees %25 followed by two hex digits, shows the encoding depth, and offers one-click unwrapping — never an automatic fix, because sometimes double-encoded text is genuinely what you have to work with.

Common percent-encodings reference

CharacterMeaning / noteEncoded
(space)Space%20
!Exclamation mark%21
"Double quote%22
#Hash / fragment start%23
$Dollar%24
%Percent (the escape sign itself)%25
&Ampersand (separates parameters)%26
'Apostrophe%27
(Open parenthesis%28
)Close parenthesis%29
*Asterisk%2A
+Plus (means space in form data)%2B
,Comma%2C
/Slash (path separator)%2F
:Colon%3A
;Semicolon%3B
<Less than%3C
=Equals (key = value)%3D
>Greater than%3E
?Question mark (starts the query)%3F
@At sign%40
[Open bracket%5B
\Backslash%5C
]Close bracket%5D
^Caret%5E
`Backtick%60
{Open brace%7B
|Pipe%7C
}Close brace%7D

Careful with two of these: : is %3A — a popular encoder's reference table lists it as %3D, but that is the code for =. And é is two triplets, %C3%A9, because it is two UTF-8 bytes — every non-ASCII character encodes byte by byte, which is why the breakdown table above lists one row per character with all its bytes.

Encode a URL in code

Prefer to encode in your own program? The tool above generates the exact code for your input — here are the patterns:

JavaScript

// Encode a single value for use in a query string
encodeURIComponent("hello world & more"); // "hello%20world%20%26%20more"

// Encode a full URL, preserving structural characters (: / ? & = #)
encodeURI("https://example.com/search?q=hello world");

Python

from urllib.parse import quote, quote_plus

quote("hello world & more", safe="")   # strict, close to RFC 3986
quote_plus("hello world")              # form encoding: "hello+world"

PHP

rawurlencode("hello world");  // close to strict RFC 3986
urlencode("hello world");     // form encoding: "hello+world"

curl

curl -G "https://example.com/search" --data-urlencode "q=hello world"
# note: --data-urlencode always uses form encoding (+ for spaces)

What this tool does NOT do

Here is the honest answer: encoding is not encryption, and it does not make a URL safe.

Percent-encoding only changes how characters are written — anyone can decode %20 back to a space. Never use it to hide a token, a password or personal data. It is also not a security escape: encoding a <script> tag does not make it safe to put in HTML, and it does not protect a database query.

It also cannot fix a broken URL. If the address has the wrong host, a missing slash or a typo, encoding will faithfully preserve the mistake — it only escapes characters, it never corrects structure. And it cannot tell you whether a URL is safe to open: a perfectly encoded link can still point to a phishing page. Check the domain before you click.

Finally, encoding is not the same as Base64. Base64 recodes every byte into a 64-character alphabet, making output about 33% larger and unreadable — and standard Base64 itself needs URL escaping. Use percent-encoding for URLs, and Base64 only when a system asks for it by name.

More free tools

More free tools from The Cited Brand:

Frequently asked questions

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters a URL cannot safely carry with a % sign followed by two hex digits — the byte value of the character. A space becomes %20, an ampersand becomes %26, and the French é becomes %C3%A9 (its two UTF-8 bytes). It exists because URLs were designed for a tiny ASCII alphabet: anything outside it must be encoded so every server reads the URL the same way.

What does %20 mean in a URL?

%20 is a space. The % starts a percent-encoded byte, and 20 (hex) is 32 in decimal — the ASCII code for a space. So 'hello world' becomes 'hello%20world'. You will see the same pattern for other characters: %26 is &, %3F is ?, and %C3%A9 is é.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent is for a single value going into a URL: it encodes everything except A–Z, a–z, 0–9 and - _ . ! ~ * ' ( ). encodeURI is for a whole, already well-formed URL: it additionally leaves ; / ? : @ & = + $ , # untouched so the URL's structure survives. The classic bug is calling encodeURI on a value that contains & — the & stays, so the query parses as two parameters. Rule of thumb: whole URL → encodeURI; each value you insert → encodeURIComponent.

When should I use form encoding, with + for spaces?

Use + only in form-encoded query data — the format HTML forms submit and most servers expect in ?key=value pairs. Use %20 everywhere else: paths, fragments, slugs, and any value handled as a single opaque string. Many servers read both, which is why the confusion survives — but in a path, + is a literal plus, so %20 is the safe universal choice.

What is double encoding, and how do I fix %2520?

Double encoding is encoding an already-encoded string again. Since % itself encodes as %25, the sequence %20 becomes %2520. Decoding once gives %20 — still encoded, not a space. It happens when a framework auto-encodes a value you already encoded, or when redirects encode the same parameter on every hop. Fix it by decoding once more: this tool warns you when it sees %25 followed by two hex digits and offers one-click 'decode one level'.

Which characters must always be encoded in a URL?

Always encode: spaces, %, " < > \ ^ ` { | }, control characters, and every non-ASCII character (encoded as its UTF-8 bytes). In query values, also encode &, = and + because form and query conventions give them structural meaning — a literal + in a form query decodes as a space. The strict RFC 3986 set also encodes ! ' ( ) *, which JavaScript's built-ins leave as-is.

How do I encode a URL in code?

In JavaScript: encodeURIComponent(str) for a value, encodeURI(str) for a whole URL. For strict RFC 3986 add .replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase()). In Python: urllib.parse.quote(text, safe='') is close to strict RFC 3986; quote_plus(text) produces form encoding (+ for spaces). In PHP: urlencode() is form encoding, rawurlencode() is close to strict. The tool above has a 'Do it in code' panel that generates these snippets for your exact input.

Is URL encoding the same as Base64?

No. Base64 recodes every byte into a 64-character alphabet, making output about 33% larger and unreadable, and standard Base64 itself needs URL escaping. Percent-encoding only escapes the characters a URL cannot carry and leaves everything else readable — 'caf%C3%A9' still clearly says café. They solve different problems.

Why does + mean a space in a query but not in a path?

In a query string parsed as form data, + means space — so a literal plus must be sent as %2B, or C++ in a form query decodes as 'C '. But in a path, + is a literal plus: /files/hello+world.txt is a file whose name contains plus signs. To make it worse, JavaScript's decodeURIComponent never converts + at all — you must replace it before decoding. This tool has a 'Decode + as space' checkbox that does the replacement correctly, in the right order, so a real %2B still survives as +.

Is my URL uploaded or stored?

No. Encoding and decoding happen entirely in your browser using built-in JavaScript functions — you can verify this in the Network tab, or disconnect from the internet and the tool still works. This matters because URLs routinely carry tokens, API keys and session IDs: some popular tools process your input on their servers by default. Nothing you paste here ever leaves your device.