Boneyard Tools

URL Encoder and Decoder

Percent-encoding swaps unsafe characters for a percent sign and two hex digits so text survives inside a URL. This tool has three modes: Component escapes every reserved character for a single query value or path segment, Full URL keeps the slashes and separators that make a link work, and Decode reverses encoding back to readable text. Every conversion runs in your browser.

How to encode or decode a URL

  1. Pick a mode tab: Component, Full URL or Decode.
  2. Paste your text or URL into the input box (it is labelled Encoded text in Decode mode).
  3. Read the converted result in the box below, with a live character count beside it.
  4. Click Copy to grab the output.
  5. If Decode reports a malformed escape, fix the stray percent sign or incomplete sequence and try again.

Examples

Encode a query value (Component)

name=Ada Lovelace&dept=R&D
name%3DAda%20Lovelace%26dept%3DR%26D

Escape a full link but keep its structure (Full URL)

https://ex.com/path with space?q=a&b=c
https://ex.com/path%20with%20space?q=a&b=c

Decode an encoded value (Decode)

caf%C3%A9%20%26%20cr%C3%A8me
café & crème

Frequently asked questions

What is the difference between Component and Full URL?

Component uses encodeURIComponent and escapes reserved characters like / ? : & = so a single value is safe inside a query string. Full URL uses encodeURI and leaves those structural characters intact so a whole link still works. In the examples above the ampersand becomes %26 in Component but stays a plain & in Full URL.

When should I use Component mode?

Use Component for one piece of data going into a URL, such as a query parameter value, a single path segment or a form field, where every reserved character must be escaped so it cannot be mistaken for URL syntax.

When should I use Full URL mode?

Use Full URL when you already have a complete address and only want to fix unsafe characters like spaces or accented letters. It preserves the grammar characters / ? : @ & = + $ , # so the link keeps working.

Does a space become %20 or a plus sign?

This tool always produces %20 for spaces, which is correct for paths and is also accepted in query strings. The plus sign is only used by the older application/x-www-form-urlencoded form encoding, which this tool does not emit.

Will Decode turn a plus sign back into a space?

No. Decode uses decodeURIComponent, which leaves a literal + unchanged because + is not percent-encoding. If your source used form encoding where + means space, replace + with a space yourself before decoding.

How are accented letters and emoji handled?

Non-ASCII characters are encoded as their UTF-8 bytes, one %XX pair per byte. The letter Γ© becomes %C3%A9 and many emoji expand to four bytes, so a single glyph can turn into eight hex characters. Decode reverses this back to the original character.

Which characters are never escaped?

Component leaves the unreserved set alone: A to Z, a to z, 0 to 9, and the marks - _ . ! ~ * ' ( ). Full URL keeps that set plus the URL grammar characters, so it changes far fewer characters than Component.

Why does decoding fail with an error?

Decoding throws when the input has a malformed percent escape, for example a stray % or an incomplete byte sequence like %E0%A4%A. Fix or remove the broken escape and the result will appear.

Is my text private?

Yes. All encoding and decoding happens locally in your browser using the built-in JavaScript functions, and nothing is uploaded to a server.

Learn more

Related tools