Debug URL Parameters: Encode → Test Regex → Format JSON
Fix broken URLs and query strings: URL-encode special characters, test parameter patterns with regex, then format the JSON response. Essential workflow for API and frontend developers.
The Problem
Your API calls fail silently because a query parameter contains special characters. Or you're parsing URLs with regex and can't get the pattern right. Or the JSON response is minified and unreadable. This three-step workflow solves all three problems in sequence.
Why This Matters
URL encoding bugs are notoriously hard to spot because browsers and HTTP clients partially encode URLs automatically — creating inconsistencies between development and production. Systematically encoding, validating, and parsing URLs eliminates an entire class of integration bugs.
Step-by-Step Instructions
URL-encode query parameters with special characters
Paste your raw parameter value (email, search query, or path with spaces/symbols) into the URL Encoder. It converts spaces to %20, & to %26, = to %3D, etc. Use the encoded value in your API request.
Validate URL structure with regex
Use the Regex Tester to validate that your URL has the correct structure. Pattern: https?:\/\/[\w-]+(\.[\w-]+)+(\/[\w-./?%&=]*)? for general URLs, or a custom pattern for your specific parameter format.
Format the API response JSON
Paste the API response into the JSON Formatter to confirm the request was processed correctly and inspect the returned data structure.
Try It Now — URL Encoder
Open full page →All processing happens in your browser — no data is sent to any server.
Before & After Example
GET /api/search?q=hello world&filter=date>=2026-01-01&[email protected] # Spaces and @ break the URL # = in date range is ambiguous # Result: 400 Bad Request
GET /api/search?q=hello%20world&filter=date%3E%3D2026-01-01&user=alice%40example.com # All special chars encoded # Result: 200 OK
Frequently Asked Questions
What's the difference between encodeURI and encodeURIComponent in JavaScript?
encodeURI encodes a full URL but preserves structural characters like /, ?, =, &. encodeURIComponent encodes a single value and encodes everything including those structural chars. Always use encodeURIComponent for query parameter values.
Why does my URL work in the browser but fail in curl?
Browsers auto-encode many characters, but curl doesn't. Always explicitly encode parameter values. Use curl --data-urlencode or encode manually before constructing the URL.
How do I extract query parameters from a URL with regex?
Use: [?&]([^=&]+)=([^&]*) with global flag to extract all key-value pairs. Groups 1 and 2 capture the key and value respectively. Test this with the Regex Tester before using in production code.
Related Workflows
Try all 3 tools in this workflow
Each tool is free, runs in your browser, and requires no signup.