Development Tools

URL Encode / Decode — encodeURIComponent & decodeURIComponent

URL-encode or decode text free with encodeURIComponent and decodeURIComponent tabs. Not HTML entity encoding — encode your query strings now.

TL;DR: Choose URL Encode or URL Decode tabs, paste text, click the action button, and copy the result — encoding uses encodeURIComponent and decoding uses decodeURIComponent. This is not HTML entity encode/decode (&, <, etc.).

Reviewed by FYN Tools Editorial · Guides ·

Privacy & processing: Encoding and decoding run entirely in your browser using native encodeURIComponent and decodeURIComponent. No HTML entity translation is performed.

URL Encode Decode

URL-encode or decode text free with encodeURIComponent and decodeURIComponent tabs. Not HTML entity encoding — encode your query strings now.

Inputs
Plain text or percent-encoded string in the input textarea
Outputs
URL-encoded or decoded plain text in the output panel
Processing
Client-side (browser encodeURIComponent/decodeURIComponent)
Limits
Invalid percent sequences on decode show an error toast; empty input shows an empty-input toast

Quick steps

  1. Select the URL Encode tab to escape text for query parameters.
  2. Paste text into Input Text and click URL Encode.
  3. Copy the percent-encoded output.
  4. Switch to URL Decode for the reverse operation.
  5. Paste an encoded string and click URL Decode.
  6. Click Clear to reset both input and output.
  • URL Encode tab
  • URL Decode tab
  • encodeURIComponent encoding
  • decodeURIComponent decoding
  • Copy and Clear actions

Data input / output

Supported inputs, outputs, formats, limits, and where processing runs for URL Encode Decode
InputsPlain text or percent-encoded string in the input textarea
OutputsURL-encoded or decoded plain text in the output panel
FormatsPercent-encoding (%XX) via encodeURIComponent rules
LimitsInvalid percent sequences on decode show an error toast; empty input shows an empty-input toast
ProcessingClient-side (browser encodeURIComponent/decodeURIComponent)

How to Use the URL Encode Decode

  1. Select the URL Encode tab to escape text for query parameters.
  2. Paste text into Input Text and click URL Encode.
  3. Copy the percent-encoded output.
  4. Switch to URL Decode for the reverse operation.
  5. Paste an encoded string and click URL Decode.
  6. Click Clear to reset both input and output.

What is an URL Encode Decode?

The URL Encode tab runs encodeURIComponent on your input, escaping characters unsafe in URL components. The URL Decode tab reverses percent-encoding with decodeURIComponent. Each tab has its own input/output columns and action button.

This tool handles URI component encoding — not HTML entities like & or '. For HTML entity work, use a dedicated HTML tool. Decode errors (malformed sequences) show a destructive toast and clear output.

handleEncode and handleDecode wrap the native functions in try/catch with toast feedback. A Clear button resets both fields. Tab switching preserves separate encode/decode modes.

How it works

URL Encode Decode reads your input from the panel above, applies url encode tab, and shows a result you can copy or download. Options stay visible so you can iterate without reloading the page.

For binary-to-text encoding, use our Base64 Converter.

Common Use Cases & Examples

  • Query string building: Encode spaces and symbols in a search term before appending to ?q=.
  • Redirect debugging: Decode a captured returnUrl parameter to read the original path.
  • API testing: Encode JSON fragments used as URL-encoded form values.

Input / Output Examples

Input

hello world & goodbye

Output

hello%20world%20%26%20goodbye

Frequently Asked Questions

What is URL encoding?+

URL encoding converts special characters and spaces into a format that can be safely transmitted in URLs. For example, spaces become %20, and special characters get converted to their percent-encoded equivalents.

When should I use URL encoding?+

Use URL encoding when passing parameters in URLs, especially when the values contain spaces, special characters, or non-ASCII characters. This ensures the URL is valid and the data is transmitted correctly.

What characters are encoded?+

Characters like spaces, quotes, slashes, ampersands, equals signs, and other special characters are encoded. Alphanumeric characters (A-Z, a-z, 0-9) and some safe characters like - _ . ~ are typically not encoded.

Can I encode entire URLs?+

Yes, you can encode entire URLs or just specific parts like query parameters. This tool handles both use cases and properly encodes all necessary characters.

Key Features

  • URL Encode tab
  • URL Decode tab
  • encodeURIComponent encoding
  • decodeURIComponent decoding
  • Copy and Clear actions

Benefits

Build safe query strings without manual escaping.

Read encoded redirect parameters quickly.

Match JavaScript encoding behavior exactly.

When to Use URL Encode Decode

  • Encoding query parameter values before building a URL manually
  • Decoding a percent-encoded string from a redirect link
  • Preparing user-generated search terms for API requests
  • Debugging encodeURIComponent behavior in JavaScript

Advantages

  • Separate Encode and Decode tabs
  • Native encodeURIComponent/decodeURIComponent
  • Copy button on output
  • Clear error toasts on bad decode input

Tips

  • Use Encode for individual query values, not full URLs with scheme/host.
  • Decode failures usually mean truncated or invalid % sequences.
  • Spaces become %20 under encodeURIComponent.
  • Copy output after each action — fields do not auto-sync.

Common Mistakes

Expecting HTML entity encoding — this is URI percent-encoding only.

Decoding strings that were encoded with encodeURI instead of encodeURIComponent.

Assuming + means space — decodeURIComponent expects %20 for spaces.

Leaving input empty and expecting output without clicking the action.

Summary

Encode with encodeURIComponent or decode with decodeURIComponent — URI component tool, not HTML entity encoding.

About this page

URL Encode Decode is maintained by FYN Tools Editorial. See our about and contact pages for ownership, editorial standards, and support.

· Published

Prefer browser-side tools when handling sensitive drafts. Do not paste production secrets, customer PII, or live API keys into online forms.