The 400 Bad Request error occurs when the server cannot understand or process your request because it’s malformed, incomplete, or incorrect. Unlike server-side errors (like 500), this one typically comes from the client side — your browser, device, or request.

What Does a 400 Bad Request Error Mean?

When you visit a website, your browser sends a request to the server. If the request is badly formatted or contains invalid information, the server rejects it and returns:

400 – Bad Request
“I don’t understand what you’re asking me to do.”

This is a client-side error, meaning something went wrong before the server could even process the request.

Common Causes of Error 400

CauseDescription
Malformed URLTypos, invalid characters, or incorrect structure in the web address
Corrupted cookiesOutdated or conflicting cookies stored in your browser
Too large request headersOverloaded request (e.g., too many or too large cookies)
DNS cache issuesOutdated IP address or DNS data stored on your system
Faulty browser extensionsAdd-ons that modify or break request data
Broken API/form requestsMissing fields, wrong content type, or invalid JSON in POST/GET requests

How to Fix Error 400 (Step-by-Step)

Follow these steps in order — most 400 errors are easy to fix:

1.  Check the URL

  • Make sure the web address is typed correctly.
  • Look for extra characters like ??, %%, or unnecessary query strings.

Example of a broken URL:

https://example.com//page?id==abc@@

2.  Clear Browser Cookies and Cache

Corrupted cookies are the #1 cause of 400 errors.

  • In Chrome:
    Settings → Privacy & Security → Clear browsing data → Cookies and cached files
  • Or simply open the site in Incognito/Private Mode to test.

3.  Flush DNS Cache

Your device may have cached outdated or incorrect DNS info.

  • Windows:
    ipconfig /flushdns
    
  • macOS:
    sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
    
  • Linux:
    Depends on distro (e.g., systemd-resolve –flush-caches)

4.  Try a Different Browser or Device

Open the same URL in Firefox, Safari, or on a different phone or computer. If it works, the problem is in your primary browser.

5.  Disable Browser Extensions, VPNs, or Proxies

These can alter your requests or block certain content. Disable all extensions and try again.

6.  Check Your Form or API Request (for Developers)

If you’re working with APIs or web forms:

Validate all input fields

Use correct headers (e.g., Content-Type: application/json)

Ensure proper data format (JSON, URL-encoded, etc.)

 Advanced Use Cases

ScenarioSolution
Form returns 400Check required fields and method (POST/GET)
Error after site migrationClear DNS and browser cookies
Admin panel not loadingDisable plugins and clear session cookies
API request failsValidate JSON and headers

Still Not Fixed? Try This:

  • Test the website on a mobile device using mobile data — to bypass local DNS and cache.
  • Use tools like https://httpstatus.io or browser developer tools to inspect the response.
  • If you’re not the site owner, contact the site’s support with a full screenshot and steps to reproduce.

Summary

The 400 Bad Request error means your browser sent a request the server couldn’t process — typically due to bad formatting, cookies, or DNS issues.

To fix it:

  • Check and clean the URL
  • Clear your cookies and cache
  • Flush your DNS
  • Test in another browser
  • Disable interfering extensions
  • (If coding) Validate your API or form data