URL Encoder & Decoder

Encode Mode

Batch Input

0 Items

1 Output lines

0 Output chars

Explore Our Tools

Workflow & Usage

  1. Pick your mode: Encode (raw text → percent-encoded) or Decode (percent-encoded → text).
  2. Choose scope:
  • Component for path segments or query values (safest).
  • Full URL for an entire link (keeps URL separators intact).
  1. Set options:
  • Spaces as “+” (encode only) for form/query compatibility.
  • Lowercase %hex to normalize encoding style.
  • “+” as space (decode only) to interpret plus signs as spaces.
  1. Single or Batch:
  • Single: process the whole textarea.
  • Batch: one item per line; enable Trim lines to ignore accidental spaces.
  1. Paste/type input. Output updates live.
  2. Copy the result with one click.

The badges on top show Mode, Input type, Items, Output lines, and Output chars so you can sanity-check results at a glance.

Use Cases

  • Web Development & APIs Encode query parameters safely before building URLs, avoiding broken links or injection issues.

  • Form Data Debugging Inspect or correct URL-encoded form submissions and query strings directly in the browser.

  • Automation & Scripts Prepare encoded payloads for shell commands, curl requests, or API calls without external tools.

  • CMS or Spreadsheet Cleanup Decode messy or double-encoded links copied from databases or exported CSVs.

  • SEO & Redirect Management Check and normalize URL slugs, redirect targets, and tracking parameters for accuracy.

  • Testing & QA Quickly test edge cases with emoji, special characters, or non-Latin text in URLs.

  • Batch Transformations Convert entire lists of paths, keywords, or slugs - one per line - for import into CMS or routing systems.

Tips for Best Results

  • When in doubt, use Component. It’s safer for values and path parts, especially with & and =.
  • Don’t double-encode. If you see %252F, you encoded %2F again. Decode once, then re-encode correctly.
  • Only wrap when required. Modern APIs rarely need line-wrapped or prettified URLs; keep them compact.
  • Batch transforms for migrations. Paste one path/value per line to clean up old data quickly.

How It Works

All logic runs directly in your browser:

  • Two precise modes. ComponentencodeURIComponent (for path segments, query values). Full URLencodeURI (for an entire URL; preserves reserved separators like :/?#[]@!$&'()*+,;=).

  • Batch by newline. Process many lines at once. Optional Trim lines keeps your alignments tidy.

  • Form quirks, handled. Spaces as “+” converts %20+ during encode to match application/x-www-form-urlencoded. “+” as space converts + → space before decode (common for query strings).

  • Cosmetic normalization. Lowercase %hex toggles %2F%2f while leaving plain characters untouched.

  • Resilient decoding. Tries decodeURIComponent (strict), falls back to decodeURI (lenient); surfaces a clear error if input is broken.

No uploads, no servers, no tracking - just instant URL transforms in memory.

Frequently Asked Questions

encodeURIComponent is for parts of a URL (path segments, query values). It encodes everything except a small safe set, so reserved characters like & and = are escaped. encodeURI is for full URLs and *keeps* reserved characters used as separators (:/?#[]@!$&'()*+,;=).

Forms with application/x-www-form-urlencoded represent spaces as +. Turn this on to convert %20 → + during encoding. On decode, enable “+ as space” so + becomes a space before decoding.

Percent-encoding is case-insensitive, but some style guides prefer lowercase (e.g., %2f instead of %2F). Toggle **Lowercase %hex** to normalize.

Yes. Pick **Component** (encodeURIComponent) for path/query **values** or **Full URL** (encodeURI) for a complete URL you don’t want to over-escape.

The decoder tries decodeURIComponent first, then falls back to decodeURI. If both fail, it returns a clear “Malformed percent-encoding” error without crashing.

Yes. JavaScript’s URL encoders work with UTF-8. Emoji and non-Latin scripts are encoded safely.

No. Everything runs locally in your browser. Nothing leaves your device, and it works offline once loaded.

Read More From Our Blog