Skip to content

Encoding

URL Encoder & Decoder

Encode text for URLs or decode percent-encoded values instantly.

Loading tool…

Find this tool in

About this tool

What is URL Encoder & Decoder?

Encode one query value or path component before combining it with a URL. The characters that separate a URL's structure must remain distinct from characters inside a value. Decode a component when inspecting an encoded link, but keep the original around so you can distinguish a representation change from a changed destination.

A worked example

Encode a query value containing an accent, spaces and an ampersand

Example input

café & tea

Expected result

caf%C3%A9%20%26%20tea

URI-component encoding represents the accented letter with its UTF-8 bytes and protects the ampersand so it remains part of the value. Add the result as one parameter value, not as a replacement for an entire URL. The URL parser is the better choice when you need to inspect or edit several existing query parameters.

Common mistakes and limits

  • A plus sign is not automatically a space in every decoding context. Form-encoded query data and generic percent decoding use different conventions.
  • Decoding an incomplete percent escape should fail rather than invent characters. Inspect a copied or truncated URL when the input contains a stray percent sign.

Features

What you can do

  • Encode text using standard URI component encoding.
  • Decode percent-encoded URL values.
  • Support international characters and emoji.
  • Swap input and output for quick round trips.
  • Copy generated results with one click.
  • Process all content locally in the browser.

Frequently asked questions

Questions about URL Encoder & Decoder

What is percent encoding?

Percent encoding represents certain characters using a percent sign followed by their hexadecimal byte value. For example, a space is commonly represented as %20.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is intended for complete URLs and preserves structural characters such as slashes and question marks. encodeURIComponent is intended for individual values and encodes more characters.

Why does decoding sometimes fail?

Decoding fails when the input contains incomplete or invalid percent-encoded sequences, such as a percent sign that is not followed by two hexadecimal characters.

Is URL encoding encryption?

No. URL encoding only transforms data into a URL-safe representation. It does not provide confidentiality or security.

Related tools