SimplyToolbox
⌘K
ImageVideoPDFDeveloperCalculatorBlogAbout
HomeDeveloper ToolsURL Encoder / Decoder
🔗

URL Encoder / Decoder

Encode or decode URL components using encodeURIComponent / decodeURIComponent.

What URL encoding is and why it matters

URLs can only safely contain a limited set of characters. Spaces, accented letters, ampersands, slashes inside a value, and many symbols have to be percent-encoded, which means replacing them with a percent sign followed by their hexadecimal byte value, for example a space becomes %20. This tool encodes and decodes those values so query strings, path segments, and form data stay valid and unambiguous.

It is useful for developers building API requests, anyone debugging a link that contains odd %XX sequences, and people who need to safely embed user-supplied text such as search terms into a URL.

How to use it

Choose the Encode or Decode tab at the top. In Encode mode, type or paste the raw text you want to make URL-safe, then click the button to produce the percent-encoded version. In Decode mode, paste an encoded string and the tool turns the %XX sequences back into readable characters.

Use the Copy button to grab the result for pasting into your code, browser, or API client. Switching tabs clears the fields so you always start from a clean slate.

How it works under the hood

Encoding uses the standard JavaScript encodeURIComponent function, and decoding uses decodeURIComponent. This means it encodes a value as a single URL component, so reserved characters such as the ampersand, equals sign, question mark, and slash are all escaped. That is the correct behaviour when you are inserting a value into one part of a URL, such as a single query parameter.

If you paste a malformed encoded string, for example a lone percent sign that is not followed by two valid hex digits, decoding will fail and the tool shows a clear error message rather than producing garbage output.

Frequently Asked Questions

Does this tool send my text to a server?▼
No. Encoding and decoding run entirely in your browser using JavaScript. Nothing you type is uploaded or stored anywhere.
What is the difference between encoding a component and a full URL?▼
This tool uses encodeURIComponent, which escapes a single URL component and therefore encodes reserved characters like &, =, ?, and /. That is correct for a single query parameter value but would over-encode a complete URL.
Why does decoding sometimes fail?▼
decodeURIComponent throws an error if the input contains an invalid percent sequence, such as a % not followed by two hexadecimal digits. The tool catches this and shows an error so you can fix the input.
Does a space become %20 or a plus sign?▼
This tool encodes a space as %20, following encodeURIComponent. The plus sign is only used for spaces in the older application/x-www-form-urlencoded form encoding.
Is there a length limit?▼
There is no fixed limit imposed by the tool. You can encode or decode large blocks of text, constrained only by your browser's memory.
Is it free to use?▼
Yes, it is completely free, with no sign-up and no installation required.

You might also like

{ }

JSON Formatter

Format, validate and beautify JSON

📊

JSON to CSV

Convert JSON data to CSV format

🔄

CSV to JSON

Convert CSV to JSON format

🔐

Base64 Encoder/Decoder

Encode or decode Base64 strings

SimplyToolbox

90+ free online tools. No signup. No limits. Just tools that work.

AboutContactBlogPrivacy PolicyTerms of Use

Image & Video

  • Image Compressor
  • Image Resizer
  • Image Converter
  • Video Compressor
  • Video to GIF
  • Screen Recorder

PDF & Text

  • PDF Compressor
  • PDF Merger
  • PDF Splitter
  • Word Counter
  • Markdown Editor
  • Text Diff Checker

Developer

  • JSON Formatter
  • Base64 Encoder
  • Hash Generator
  • Password Generator
  • UUID Generator
  • Regex Tester

Tools & More

  • Unit Converter
  • BMI Calculator
  • Currency Converter
  • QR Code Generator
  • Color Picker
  • Gradient Generator

© 2026 SimplyToolbox. All rights reserved.

Processing happens in your browser — your files stay private.