URL Encoder / Decoder

Use this URL encoder to percent-encode a query value, a full address or form data — or decode percent-encoded text back into readable form, entirely in your browser.

1Paste your text or URL
2Pick a mode: component, full URI, form or decode
3Press the button and copy the result

0 characters in

0 characters out

Private by design: 100% in your browser — nothing is uploaded, no sign-up. This tool runs entirely on your device.

How to use this URL encoder

Paste your text into the box, choose a mode, and press the button. The mode matters more than anything else on this page. If you are encoding one value that will sit inside a URL — a search term, a redirect target, a file name — choose Encode component: it escapes every character that could be mistaken for URL structure, so the value survives the trip intact. If you have a complete address that merely contains a space or an accented letter, choose Encode full URI: it fixes only the illegal characters and leaves the slashes, question mark and ampersands that hold the address together. Form data mode matches what browsers send when an HTML form is submitted, including the convention of writing spaces as plus signs. Decode reverses any of the three.

Decoding is deliberately strict. A percent sign that is not followed by two hexadecimal digits, or a byte sequence that does not form valid UTF-8, produces a plain-English explanation of what to check rather than silently mangled output. One exception is handled for you: text copied from form submissions often uses + for spaces, so if strict decoding fails and the text contains plus signs, the tool retries with those converted before reporting an error.

Example: a search query, encoded

Suppose a visitor types this into a search box:

a b&c

Sent raw, the ampersand would split the query into two parameters and the space could break the address entirely. Component encoding produces:

a%20b%26c

The space became %20 and the ampersand %26, so the server receives exactly one parameter with the exact value “a b&c”. Accented text grows more: “crème brûlée” encodes to “cr%C3%A8me%20br%C3%BBl%C3%A9e”, because each accented letter is two UTF-8 bytes and every byte gets its own percent code.

Why URLs need encoding at all

A URL is a small, strict language. A handful of characters have jobs inside it: / separates path segments, ? starts the query string, & separates parameters, = joins a name to a value, and # points into the page. When those same characters appear as ordinary data — in a search for “fish & chips”, say — they must be disguised, or the browser and server will read them as structure instead of text. Percent-encoding is that disguise: each unsafe character is replaced by a percent sign and the two-digit hexadecimal code of its byte. The set of characters that never need disguising is small: letters, digits, and - _ . ~ only.

The most common real-world problems this tool solves are a redirect parameter that itself contains a URL (encode it as a component, or its ? and & will be read as part of the outer address), a file name with spaces being linked from a page, an API request built by hand, and the reverse job: reading an encoded value in a log file, an email link or an analytics report and wanting to know what a human actually typed. In every case the rule of thumb is the same — encode values, not addresses; if you truly mean the whole address, use full-URI mode.

Common encoding mistakes

Four errors account for nearly every broken URL that reaches a developer's desk. The first is double encoding: text that was already encoded gets encoded again, so %20 becomes %2520 and the server decodes once to find a literal “%20” in the value. If a decoded result still contains percent signs, it was probably encoded twice — decode it once more and check. The second is encoding a whole address as a component, which escapes the :// and slashes and produces an address nothing can follow; whole addresses belong in full-URI mode. The third is forgetting that context changes the rules: a URL placed inside an HTML attribute also needs its & written as & for the HTML layer, and a URL inside JSON needs no percent-encoding of slashes at all — each layer has its own escaping, and they stack. The fourth is using + for a space in a path: plus means a literal plus in a path segment and only means a space in form data and query strings, so a file named “a+b.txt” and a search for “a b” are genuinely different inputs. When a link misbehaves, decode it here and read what the server will actually see — the bug is almost always visible at that point.

Frequently asked questions

What is percent-encoding?

Percent-encoding rewrites characters that are not allowed in a URL as a percent sign followed by two hexadecimal digits — a space becomes %20 and an ampersand becomes %26. The receiving server reverses the swap to recover the exact original text.

What is the difference between the Component and Full URI modes?

Component mode encodes everything that could break a single value inside a URL — including /, ?, & and = — so it is the right choice for one query parameter or path segment. Full URI mode leaves the structural characters of a complete URL intact and only encodes the parts that are never allowed, such as spaces and accented letters.

Why does a space sometimes become + instead of %20?

In form data (application/x-www-form-urlencoded), a space is written as + by an old convention from HTML forms. In the path or query of a normal URL, %20 is the safer and more standard choice. This tool offers both: use Form mode when you are building or reading submitted form data.

Why did my text fail to decode?

Decoding fails when a % is not followed by two hex digits, or when the percent bytes do not form valid UTF-8 — usually because the text was cut off while copying, or it was encoded with a legacy character set. The tool explains the problem instead of guessing.

Is my text uploaded to a server?

No. Encoding and decoding run in JavaScript inside your own browser. Nothing you paste is sent anywhere, stored or logged — the tool keeps working even if you disconnect from the internet after the page loads.

Which characters never need encoding?

Letters, digits and a small set of marks (- _ . ~) are always safe in a URL. Everything else — spaces, punctuation like & and =, and every non-English character — should be percent-encoded when it is data rather than part of the URL's structure.

How are non-English characters encoded?

They are first converted to their UTF-8 bytes, and each byte is percent-encoded. The letter è, for example, is two bytes in UTF-8, so it becomes %C3%A8. That is why accented and non-Latin text grows the most when encoded.

Can I encode a whole URL with this tool?

Yes — use Full URI mode for a complete address. It keeps the ://, /, ? and & that give the URL its structure and only encodes characters that are never legal, such as spaces. If instead you are putting a URL inside another URL (for example as a redirect parameter), use Component mode.

Is URL encoding a way to hide or secure data?

No. Percent-encoding is a transport format, not encryption — anyone can decode it instantly, exactly as this page does. Never place passwords, tokens or private information in a URL and assume encoding protects them.

Related tools