Excel crashing when pasting from browser? Here's the fix

Software – Microsoft Office Intermediate 👁 3 views 📅 May 26, 2026

Excel crashes when you paste HTML table data from a browser. Try Paste Special first, then strip formatting, then edit the HTML source.

Excel crashes when pasting from a web browser

You found a nice table on a website, copied it, switched to Excel, hit Ctrl+V, and bam—Excel freezes or crashes. Maybe you get the spinning beach ball or the "Microsoft Excel has stopped working" message. I know this error is infuriating, especially when you're trying to get work done fast.

This crash happens because Excel tries to parse the HTML table's complex formatting—inline styles, merged cells, weird tags—and it chokes. The issue is most common in Excel 2019, 2021, and Microsoft 365 (build 16.0+), especially when pasting from Chrome or Edge. But it can happen with any browser.

Let's walk through three fixes. Start with the simplest. Stop when your issue is resolved.

The 30-second fix: Paste Special > Text

This is the fastest way to get your data in without the crash. It strips all formatting, leaving just the raw text.

  1. Open Excel and select the cell where you want the table to start.
  2. Press Ctrl + Alt + V (or right-click and choose Paste Special).
  3. In the dialog, select Text (or Unicode Text if available).
  4. Click OK.

That's it. Your data comes in as plain text, tab-separated, so it'll still land in columns. No colors, no bold, no merged cells—but it also won't crash. If you need the original formatting, skip to the next fix.

Why this works: Excel skips the HTML parsing altogether. The browser passes plain text, and Excel pastes it directly. This is my go-to for 90% of crash-on-paste cases.

The 5-minute fix: Paste into Notepad first

If Paste Special isn't available or you want more control, use Notepad as an intermediary. This strips all hidden HTML tags and formatting, giving you clean text.

  1. Copy the table from your browser as usual.
  2. Open Notepad (Windows) or TextEdit (Mac, set to Plain Text mode).
  3. Paste the data into Notepad. You'll see the raw text with tabs between columns.
  4. Select all (Ctrl+A) and copy again.
  5. Switch to Excel and paste normally (Ctrl+V).

This works because Notepad can't handle HTML—it strips everything. On Mac, make sure TextEdit is in plain text mode (Format > Make Plain Text). If you use a rich text editor like WordPad, it won't strip the formatting properly.

Real-world scenario: I once had a client whose Excel crashed every time he pasted a table from Salesforce. The table had 40 columns and tons of inline styles. This Notepad trick saved him hours. He now uses it by default.

The 15+ minute fix: Strip HTML manually from the source

If Excel still crashes after trying the first two fixes, or if you absolutely need the original formatting (colors, borders, fonts), you need to clean the HTML before pasting. This is more advanced but gives you full control.

Step 1: Copy the HTML source

  • Right-click the table in your browser and select Inspect (or press F12).
  • Find the <table> tag in the Elements panel.
  • Right-click the <table> element and choose Copy > Copy element (or Copy outerHTML).

Step 2: Paste into a code editor or text editor with find-and-replace

Open Notepad++ (Windows), VS Code, or even plain Notepad. Paste the HTML. Then remove problematic tags. These are the usual crash culprits:

  • <style> tags and inline style="..." attributes
  • <colgroup>, <col>, and <caption> tags
  • <thead>, <tbody>, <tfoot> (Excel can handle these, but removing them reduces complexity)
  • <span> and <div> inside table cells

Use find-and-replace to delete these. For example, in VS Code or Notepad++:

  • Find: style="[^"]*" and replace with nothing (empty).
  • Find: </?style> and replace with nothing.
  • Find: <col[^>]*> and replace with nothing.

If you're in plain Notepad, you'll have to do it manually, which is tedious. Use a real code editor for this.

Step 3: Save as HTML and open in Word

Sometimes Excel still crashes when pasting even cleaned HTML. Here's another path:

  1. Save the cleaned HTML as a .html file.
  2. Open that file in Microsoft Word.
  3. Word will render the table (mostly) faithfully. Then copy from Word and paste into Excel.

Word handles HTML tables better than Excel's direct paste. This is a roundabout way, but it often preserves borders and cell shading without the crash.

Step 4: Use a macro as a last resort

If you do this frequently, write a VBA macro that pastes only the text. Open the VBA editor (Alt + F11), insert a new module, and paste this:

Sub PasteAsText()
    Dim DataObj As MSForms.DataObject
    Set DataObj = New MSForms.DataObject
    DataObj.GetFromClipboard
    Dim str As String
    str = DataObj.GetText
    Dim arr As Variant
    arr = Split(str, vbCrLf)
    Dim i As Long, j As Long
    For i = LBound(arr) To UBound(arr)
        Dim cols As Variant
        cols = Split(arr(i), vbTab)
        For j = LBound(cols) To UBound(cols)
            ActiveCell.Offset(i, j).Value = cols(j)
        Next j
    Next i
End Sub

Map this macro to a keyboard shortcut (e.g., Ctrl+Shift+V). Now you can paste clean text with one keystroke.

Why does Excel crash on HTML tables?

The crash happens because Excel tries to apply every style from the HTML—colors, fonts, borders, cell padding—to its own formatting engine. If the HTML has nested tables, colspan/rowspan with weird values, or inline CSS that references external fonts (like a Google Font), Excel's parser gets overwhelmed and throws an exception. It's a bug Microsoft has known about since at least 2019. They've patched it in some versions, but it still creeps back with certain formatting combinations.

Quick comparison of fixes

FixTimePreserves formatting?Ease
Paste Special > Text30 secondsNoEasy
Notepad intermediary2 minutesNoEasy
Strip HTML manually15+ minutesYesIntermediate
Word intermediary10 minutesMostlyIntermediate
VBA macro1 hour to set upNoAdvanced

Start with Paste Special. It's the fastest and fixes most crashes. If you need formatting, go the HTML-stripping route. And if you deal with this daily, invest the time in the macro. Your sanity will thank you.

Was this solution helpful?