SocialAPIs
Sources
PricingBlogFAQContact
Developer Tools
Free

URL Encoder / Decoder

Encode or decode URL strings for safe transmission in web applications.

When to use URL encoding?

  • • When passing special characters in URL query parameters
  • • When building API requests with user input
  • • When encoding form data for POST requests
  • • When sharing URLs containing non-ASCII characters

Building API Integrations?

Access social media data with our powerful API.

Get Free API Key

What is the URL encoder/decoder?

A free URL percent-encoder and decoder that runs entirely in your browser. Paste a string in, get its URL-safe equivalent (or the human-readable version of an already-encoded URL). Built for the moment when you're constructing a query string by hand and need a value with spaces, ampersands, or non-ASCII characters to survive being pasted into a curl command or a browser address bar.

Encode mode

Replaces every character outside the unreserved set [A-Za-z0-9-_.~] with its %XX hex equivalent. Equivalent to JavaScript's encodeURIComponent, Python's urllib.parse.quote (with safe=''), and the standard URL-encoding behaviour of most HTTP libraries.

Decode mode

Reverses the process — turns %20 back into a space, %3D back into =, etc. Useful when you've copied an encoded URL out of a browser address bar or a redirect chain and want to see the actual values that were sent.

Common scenarios where this earns its keep

  • Constructing a curl command by hand that includes a query string with spaces, ampersands, or international characters.
  • Debugging an OAuth callback URL where the encoded redirect parameter is making the response unreadable.
  • Building a "share this page" link where the URL to share contains its own query string.
  • Reading server logs that record URLs in their encoded form and you want the human version.

Frequently asked questions

What's the difference between URL encoding and base64?

URL encoding (also called percent-encoding) replaces special characters with their %XX hex equivalent so the resulting string is safe to embed in a URL path or query string. Base64 is a different format used for embedding binary data into text — it's not URL-safe by default (the / and + characters break query strings). This tool handles URL encoding only; for base64 you want a base64 tool.

Is the input sent anywhere?

No. Encoding and decoding both run in your browser via the built-in encodeURIComponent / decodeURIComponent functions. The input never leaves the tab. Safe to use on URLs that contain bearer tokens, session IDs, or other sensitive query parameters.

Does it handle the difference between encodeURI() and encodeURIComponent()?

By default we use encodeURIComponent — the stricter one that escapes everything outside the unreserved set [A-Za-z0-9-_.~]. That's the right call for individual query-string values or path segments. If you need encodeURI (leaves protocol and path separators alone for full URLs), the docs at MDN cover when each is appropriate; for SocialAPIs query params, encodeURIComponent is always correct.

When do I actually need to URL-encode something manually?

Most HTTP libraries (fetch, axios, requests, etc.) encode for you automatically when you pass params via the dedicated query-string argument. You need to encode manually when you're building a URL by string concatenation, embedding a URL inside another URL (redirects, callbacks, share links), or constructing a curl command that includes a value with spaces, ampersands, or non-ASCII characters.

More developer tools from SocialAPIs

JSON path selector · JSON formatter · cURL → code converter · Visual CSS selector

SocialAPIs

The unified API for social media data. Built for developers and AI agents.

Now in MCP Registry

Product

  • API Reference
  • Pricing
  • Documentation
  • Blog
  • Compare vs others
  • MCP Server

Free Tools

  • Network Inspector
  • Visual Selector
  • JSON Selector
  • cURL Converter
  • Leads Generator
  • Hashtag Generator
  • JSON Formatter
  • URL Encoder

Libraries

  • Network Library
  • Cheerio Library

Resources

  • GitHub
  • npm Package
  • Chrome Extension
  • System Status
  • FAQ
  • About
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Service

© 2026 SocialAPIs. All rights reserved.