BrowserTools

URL Encoder / Decoder

Percent-encode or decode URLs and params

By Guga — BrowserTools maintainer, Tbilisi, Georgia Updated 2026-09-12
Free Private No uploads
What is URL Encoder / Decoder?

Putting a raw value into a URL is unsafe for more reasons than spaces: a question mark, an ampersand or a hash in the value will be read by the browser as structure rather than content. Percent-encoding solves that by replacing each byte with a percent sign and two hexadecimal digits, and this tool applies the component form of that standard — the same one behind encodeURIComponent. Letters, digits and the marks - _ . ! ~ * ' ( ) pass through untouched; everything else, including spaces, slashes, colons and every non-ASCII character, is escaped. Decoding reverses the process and additionally turns a plus sign back into a space, matching how browsers submit HTML forms. Note what this means in practice: a value like a search query encodes correctly, while an entire URL would have its separators escaped and would not survive being pasted back into an address bar.

Encode text for safe use in a URL query string, or decode percent-encoded text back to readable form. Uses component encoding (encodeURIComponent), which escapes everything except letters, digits and - _ . ! ~ * ' ( ); the decoder also converts + back to a space.

Private URL Encoder / Decoder In Your Browser

URL Encoder / Decoder is processed locally with client-side JavaScript. Your files never touch a server, and there is no queue to wait in.

Step-by-Step

How to use URL Encoder / Decoder

1

Select the Encode tab and paste the value you need to place inside a URL into Plain input.

2

Copy the percent-encoded result from the Encoded result box and insert it as a single query-string value.

3

To read a value back, switch to Decode and supply the encoded string as Encoded input.

4

Fold the decoded text into a larger query string yourself if you have several parameters to reassemble.

Key Capabilities
  • Standard component-level percent-encoding, matching encodeURIComponent exactly
  • Non-ASCII characters encoded from their UTF-8 byte values, not mangled
  • Decoding converts + back to a space for form-style query strings
  • Immediate output, with malformed input reported rather than silently dropped
Common Use Cases
  • A front-end developer appending a user's search phrase to a query string without letting a stray ampersand break the URL.
  • A data analyst decoding a heavily escaped link from an analytics report so the parameters become readable.
  • A student assembling a request URL by hand and needing each parameter value escaped correctly.
Clear Answers

Frequently Asked Questions

Why did my whole URL come back as one escaped string?
Because this tool encodes a single component, not a complete address. Applying it to https://example.com/search produces https%3A%2F%2Fexample.com%2Fsearch, which is correct as a query-string value and useless as a link. Keep the structure yourself, then encode each parameter value separately: ?q=your%20text&page=2.
Which characters are left alone?
The unreserved and sub-delimiter set that the standard allows: A to Z, a to z, 0 to 9, and - _ . ! ~ * ' ( ). Everything else gets a percent sign and two hex digits, so a space becomes %20 and an accented letter such as é becomes its two UTF-8 bytes, %C3%A9.
What happens to a stray percent sign when decoding?
It has to introduce two valid hexadecimal digits, so a lone % or an incomplete sequence such as %zz raises an error and the reason is shown in the result box rather than being swallowed. That is deliberate: silently dropping the bad character would turn a broken link into a wrong link.
Should a space be %20 or a plus?
Either is correct, and the decoder accepts both. The plus form is what HTML form submission produces; %20 is what hand-written code and most APIs use. This tool writes %20 when encoding and reads both when decoding, converting any + back to a space first.

Related Guides

View all guides →