NV ToolkitFormat · Validate · Convert

Encoding Tools

URL Encode / Decode

Percent-encoding both ways — make any text safe in a URL, or turn %20-soup back into readable text.

In short

URL-encode and decode text online: percent-encode special characters for query strings and decode %XX sequences (and + signs) back to plain text. Free.

By NaveenKumar T · Updated

Learn: URL Encoding Explained: %20 vs +, Reserved Characters, When to Encode

  • Encode & decode in one tool
  • Handles + as space on decode
  • Full UTF-8 support

Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →

Example

URL Encode / Decode: input and output

A search query typed by a user, encoded for a ?q= parameter.

Query value
Crème brûlée & tarte "tatin" (2+2=4) #dessert/menu?
Percent-encoded
Cr%C3%A8me%20br%C3%BBl%C3%A9e%20%26%20tarte%20%22tatin%22%20(2%2B2%3D4)%20%23dessert%2Fmenu%3F

Spaces became %20 rather than +, the literal + became %2B, each accented letter expanded to two bytes (è → %C3%A8), and the parentheses were left bare — encodeURIComponent treats ( ) ! * ' ~ as unreserved.

Learn more

How percent-encoding works

URLs permit a narrow character set, so everything else travels as percent-encoding: each byte of the character's UTF-8 form becomes %XX. A space is %20, an ampersand %26, the emoji ☕ a three-byte %E2%98%95. Encoding here uses encodeURIComponent semantics — the right choice for query-string values, where &, =, and ? must be escaped to avoid being read as separators.

Decoding reverses the process and additionally converts + to a space, because HTML form encoding (application/x-www-form-urlencoded) uses + for spaces — the variant you actually meet in query strings copied from browsers.

Reserved and unreserved characters

RFC 3986 §2.2 splits every URL character into three groups, and knowing which group a character falls into explains most of what a URL encoder does. Unreserved characters never need encoding; reserved characters are structural and encoding them changes their meaning; everything else is encoded on sight.

RFC 3986 character classes and this tool's Encode output
ClassCharactersencodeURIComponent output
UnreservedA–Z a–z 0–9 - . _ ~Left as-is
gen-delims (reserved): / ? # [ ] @Percent-encoded (e.g. / → %2F)
sub-delims (reserved)! $ & ' ( ) * + , ; =Percent-encoded, except ! * ' ( ) which encodeURIComponent leaves bare
Everything elseSpace, non-ASCII, control characters, …Percent-encoded as UTF-8 bytes

Help

Frequently asked questions

Everything you need to know about the URL Encode / Decode.

01How do I use URL Encode / Decode?

Paste your text or encoded string, choose Encode or Decode, and press Convert. Encoding percent-escapes everything unsafe in URLs; decoding reverses %XX sequences and treats + as a space (form encoding).

02Why did my decoded URL fail with 'malformed' errors?

A % in the input that isn't followed by two hex digits — usually a URL that was already decoded once, or one that was truncated mid-sequence. The tool reports it rather than guessing; check whether you're decoding twice.

03Does URL encoding turn spaces into + or %20, and what happens to a real plus sign?

Encode emits %20 — encodeURIComponent follows RFC 3986, where + is not a space. Decode accepts both, converting + to a space before decoding because browsers form-encode query strings that way. The trap: a literal plus in Decode input becomes a space, so a value that must keep its + needs to arrive as %2B. Encode also leaves - _ . ! ~ * ' ( ) bare and encodes / as %2F, so feed it one parameter value, never a whole URL.

04encodeURI or encodeURIComponent — which does this tool use, and when do I want the other?

This page uses encodeURIComponent semantics, the right choice for a single query-string or path VALUE — it escapes /, ?, &, = and # because those characters would otherwise be read as URL structure. encodeURI is for encoding an already-assembled URL: it leaves /, ?, &, = and # alone since they're doing their normal job there. Feeding a whole URL to this tool corrupts it, because every / becomes %2F.

05How do I encode a whole URL rather than one parameter?

Don't encode the whole thing — encode each value that goes into it, then assemble the URL around the encoded pieces. Encoding a complete URL with this tool turns its own / and ? into %2F and %3F, breaking the structure the browser needs to parse it. Build the base path and query string by hand, encoding only the parts that come from user input or free text.

Keep working

Related tools

Learn the format

Related guides

All guides →