ToolsKit

URL Encoder/Decoder

Encode or decode URL components.

Encode or decode URL components so reserved characters can be represented safely in links and query values.

Loading the interactive tool… This page needs JavaScript to run the URL Encoder/Decoder.

How to use URL Encoder/Decoder

  1. Paste the data, code, token, or value you need to inspect.
  2. Set any format, encoding, or validation options.
  3. Run the tool and inspect the result or diagnostic output.
  4. Copy the output into your terminal, editor, API client, or project.

How URL Encoder/Decoder works

This tool applies the browser's encodeURIComponent and decodeURIComponent functions, selected with the encode and decode buttons. Encoding escapes spaces, ampersands, equals signs, slashes, question marks and non-ASCII characters as percent sequences of UTF-8 bytes, so it suits a single query value rather than a whole URL. Decoding a malformed sequence such as a lone percent sign produces an error.

Worked example

Input: a b&c=d/é in encode mode → Output: a%20b%26c%3Dd%2F%C3%A9. Decode mode turns that string back into the original text.

Common uses

  • Make a search phrase safe to place inside a query parameter.
  • Read a percent-encoded redirect URL copied from a browser address bar.
  • Debug a link where an ampersand or slash in a value broke the query string.

Best for

  • query string values
  • API request construction
  • debugging encoded URLs

Tips for better results

  • Validate the output before using it in production code.
  • Treat tokens, credentials, and secrets as sensitive even when processing happens locally.
  • For large payloads, keep an original copy so you can compare changes.

Frequently asked questions

What does URL encoding do?

It replaces unsafe characters with a percent sign and hex code, for example a space becomes %20.

When should I encode a URL?

Whenever a query value contains spaces, symbols or non-ASCII characters.

What is the difference between encodeURI and encodeURIComponent?

encodeURIComponent also encodes characters like / ? & = so it is the right choice for a single query value.

Related tools

Explore tool categories