Other HTTP 400Medium

HTTP 400 Bad Request Error: Causes and Step-by-Step Solution

We break down why HTTP 400 Bad Request occurs and how to fix it quickly. You'll get a clear diagnostic algorithm and working solutions for browsers and applications.

Updated at April 2, 2026
5-10 minutes
Easy
FixPedia Team
Применимо к:Google Chrome 100+Mozilla Firefox 100+Safari 15+Any web clients and REST API

What Does HTTP Error 400 Mean

The 400 Bad Request or 400 Invalid Request error indicates that the server did not understand your request. Unlike hosting-side errors (like the 500 series), this status code directly points to a problem with the data sent by your browser or application. In simple terms: you requested information, but the server rejected it due to an invalid format.

This message most often appears when following a link, submitting a web form, logging into a site, or calling a REST API. You will see the 400 status in the address bar and 400 Invalid Request in the developer console.

Common Causes

The server returns this code only if the request violates basic HTTP rules. Here are the specific triggers:

  • Incorrect URL syntax. The address contains forbidden characters, spaces, Cyrillic characters without URL encoding, or extra slashes.
  • Corrupted or outdated cookies. The browser sends stale session tokens or files that exceed the allowed header size (typically 4–8 KB).
  • Exceeding data size limits. You are trying to upload a file or send JSON/XML that exceeds the server's configured limits.
  • Conflicting network extensions. Ad blockers, VPN clients, or User-Agent modifiers automatically substitute request headers, making them invalid.
  • Data format mismatch. The client sends data in UTF-8 encoding, but the server expects a different one, or the request body structure is broken.

Solutions

Solution 1: Check and Fix the URL

Start with the most obvious thing. If you typed the address manually or copied it from an external source, check the string for typos.

  1. Ensure there are no accidental spaces or characters like %20 at the end of the address.
  2. If the URL contains Cyrillic characters, the browser should automatically encode them into a format like %D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82. If this didn't happen, use an online URL encoder or replace Russian letters with Latin equivalents.
  3. Press Enter to reload. Often, this is enough for the browser to generate a clean request.

💡 Tip: If you are developing an API, inspect the request body using Postman or curl. Ensure the Content-Type matches the actual data (e.g., application/json).

Solution 2: Clear Browser Cache and Cookies

Outdated session files are the most common cause of a 400 error on working websites.

  1. Press Ctrl + Shift + Delete (Windows/Linux) or Cmd + Shift + Delete (macOS).
  2. In the window that opens, select the time range All time.
  3. Check the boxes for "Cookies and other site data" and "Cached images and files".
  4. Click "Clear data" and restart your browser.

After clearing, the site will ask you to log in again. Enter your credentials—this will create a new, valid session without corrupted headers.

Solution 3: Temporarily Disable Extensions

If clearing data didn't help, check if third-party software is interfering with HTTP traffic.

  1. Open your browser in incognito mode (Ctrl + Shift + N or Cmd + Shift + N).
  2. Navigate to the problematic site. In this mode, most extensions are disabled by default.
  3. If the site loads without an error, go to the Extensions section (chrome://extensions/ or equivalent) and disable them one by one, reloading the page after each.
  4. Identify the culprit. Often, these are old VPN plugins, header modifiers, or aggressive tracker blockers. Update or remove them.

Solution 4: Check the Size and Format of Uploaded Data

A 400 error often occurs when trying to upload an attachment to a portal or submit a form.

  1. Check the file size. Most web servers limit uploads by default to 2–10 MB. If the file is larger, the server will terminate the connection.
  2. Change the file extension. Try archiving the document into .zip or .rar. Sometimes servers block .exe or .bat files for security reasons, returning 400 Invalid Request instead of an explicit denial.
  3. If you are working with an API, ensure the JSON is valid. Use online validators or the jq . < request.json command in the terminal to find a missing comma or quote.

Prevention

To prevent a 400 error from recurring, follow a few simple rules. Regularly update your browser to the latest version: developers constantly fix bugs in network header handling. Do not manually edit URLs unless you know URL encoding rules. When working with web forms, check the file upload limits in the service's documentation. Finally, periodically clear cookies for rarely visited sites—this prevents the accumulation of stale tokens that the server no longer recognizes.

F.A.Q.

Why does HTTP 400 Bad Request occur?
Can HTTP 400 be related to a virus?
What to do if the error only appears in one browser?

Hints

Check URL correctness
Clear cache and cookies
Check file upload size
Disable extensions and antivirus

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community