Fix Excel HTTP 400 Error When Adding a Header Image
Question details
The user needs to resolve an HTTP 400 request-header error that appears when adding an image to an Excel worksheet header.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user is inserting a picture into an Excel header for printing or page layout.
- Observed behavior
- Excel or an Office-connected service returns an HTTP 400 error, which may be related to the image file, Office account session, browser sign-in data, network, or a recent update.
Save the header image as a small JPG or PNG with a short file name, such as header-logo.png, in a local folder you can access. Close Excel workbooks before resetting Office sign-in or browser data.
Use a smaller local image with a simple file name
Use this first when the error occurs with one image or workbook, especially if the image is large, cloud-based, or has a long file path.
Excel header pictures work best when the source image is a standard local JPG or PNG. A short name and accessible folder can prevent file-processing issues during insertion.
Save a copy of the image as a JPG or PNG in a local folder such as Pictures. Rename it with a short name using letters, numbers, hyphens, or underscores only.
In Excel, select Insert > Text > Header & Footer, then click the left, center, or right header section where you want the image.
On the Header & Footer tab, select Picture, browse to the local JPG or PNG file, and select Insert. Choose Format Picture if you need to adjust its size.
Close Excel completely, reopen the workbook, and try inserting the same prepared image once more.

Refresh Office sign-in data and install updates
Use this when the error began after an Office update, an account warning appeared, or the problem occurs in more than one workbook.
Clear browser or Office web sign-in cookies
Use this when reconnecting your Office account does not help and the error continues across files or after a recent update.
Add a Header Image in WPS Spreadsheet Without Excel Sign-In Errors
WPS Spreadsheet provides a lightweight way to prepare worksheets for printing and add header content using familiar spreadsheet tools. Open the workbook in WPS Office, enter header and footer editing, and insert a local image for your printed pages.
- 1. Open the workbook in WPS Spreadsheet: Launch WPS Office, select Open, and choose the affected XLSX or XLS workbook.
- 2. Enter header and footer editing: Open the Insert tab and select Header & Footer to display the header sections for the worksheet.
- 3. Choose a header section: Click the left, center, or right header area where the logo or image should appear.
- 4. Insert the local picture: Use the Picture option in the header tools, select a local JPG or PNG file, and confirm the insertion.
- 5. Check the print layout: Select File > Print to preview the pages and confirm the header image is positioned correctly.

Frequently Asked Questions
Why does Excel show “HTTP Error 400: The size of the request headers is too long”?
This error commonly points to web or Office account session data, such as oversized or corrupted sign-in cookies. It can appear while Excel processes a connected service, even when you are inserting a header image.
What image formats can I use in an Excel header?
Use common formats such as JPG, PNG, or GIF. For the most reliable result, choose a smaller JPG or PNG saved in a local folder with a simple file name.
How do I add an image to an Excel header?
In Excel, select Insert > Text > Header & Footer, click a header section, and then select Picture on the Header & Footer tab. Browse to the image and select Insert.
What should I do if the HTTP 400 error started after an Office update?
Restart Excel, go to File > Account > Update Options > Update Now, and then sign out and back in through File > Account. If the issue remains, clear Microsoft sign-in cookies in your browser and test another network or Windows user profile.
Why does the error happen with several Excel files?
When multiple workbooks are affected, the cause is more likely Office account data, browser cookies, a network condition, or an Office update than a problem with one workbook or image file.




