Privatool

URL Encoder & Decoder Online Free

URL Encoder / Decoder is a free online tool that percent-encodes special characters in URLs and query strings — and decodes them back to plain text — entirely in your browser. It supports both component-level encoding (encodeURIComponent) and full-URL encoding (encodeURI), so you always get the right output for your use case.

Loading tool…

How to Encode or Decode a URL Online

  1. 01

    Enter your text or URL

    Paste a URL, query string, or any text into the input area. The output updates immediately as you type.

  2. 02

    Choose Encode or Decode

    Select Encode to convert special characters to percent-encoded form, or Decode to convert them back. Enable "Encode full URL" to preserve structural URL characters like :// and ?.

  3. 03

    Copy or swap the result

    Click Copy to grab the result. Use Swap to move the output back to the input — handy for round-trip verification.

Features

  • Encode text using encodeURIComponent
  • Decode percent-encoded strings
  • "Encode full URL" mode (encodeURI)
  • Character count before and after conversion
  • Swap input and output instantly
  • 100% client-side — no data leaves your browser
  • Works offline once the page is loaded
  • No login, no file upload, no sign-up

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent-encoding) replaces characters that are not allowed in a URL with a % sign followed by their hexadecimal ASCII code. For example, a space becomes %20, & becomes %26. This ensures that URLs are valid and can be transmitted over the web without ambiguity.

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes an entire URL and preserves characters that have structural meaning in URLs — such as :, /, ?, =, and &. encodeURIComponent encodes a single query parameter value and escapes those structural characters too. Use encodeURIComponent when encoding a value that will appear inside a query string; use encodeURI (the "Encode full URL" option) for complete URLs.

When do I need to decode a URL?

You need to decode a URL when you receive a percent-encoded string and want to read it as plain text — for example, when inspecting a redirect URL, parsing a query parameter, or debugging an API request that contains encoded data.

What characters get encoded by encodeURIComponent?

All characters except A–Z, a–z, 0–9, and - _ . ! ~ * ' ( ) are encoded. This includes spaces (%20), slashes (%2F), colons (%3A), question marks (%3F), ampersands (%26), and many others. The tool shows you the exact encoded output for any input.

Is my data sent to a server when I use this tool?

No. All encoding and decoding happens locally in your browser using the built-in JavaScript functions encodeURIComponent, encodeURI, decodeURIComponent, and decodeURI. Nothing is sent to any server. The data is gone when you close the browser tab.

Related Tools