What is IMPORTDATA in Google Sheets?

IMPORTDATA retrieves a text file from a web address and parses it into sheet cells. It works with comma- or tab-separated values published at a stable URL. Government open data, published exports, and simple report endpoints are common sources.

When to use it

Use IMPORTDATA when a system publishes CSV or TSV at a public link and you want a live grid without manual downloads.

When to skip it

Skip IMPORTDATA for JSON APIs, authenticated feeds, or files that change column order without notice. IMPORTRANGE or a script may be safer.

How it works

  1. 1

    Confirm the URL returns raw CSV or TSV in the browser, not an HTML wrapper page.

  2. 2

    Enter =IMPORTDATA("https://example.com/data.csv") in the destination cell.

  3. 3

    Leave space below and to the right for the parsed table to spill.

  4. 4

    Add QUERY or ARRAYFORMULA cleanup if the file includes quote characters or blank trailer rows.

  5. 5

    Publish your own CSV from another sheet with File > Share > Publish to web when you control the source.

  6. 6

    Monitor for #REF! or parse errors when the publisher changes delimiter or encoding.

Examples in Google Sheets

Open data feed

=IMPORTDATA("https://data.city.gov/export.csv") loads a municipal dataset for local analysis.

Published sheet export

=IMPORTDATA(published_csv_url) mirrors a partner tab they expose via Publish to web as CSV.

TSV log file

=IMPORTDATA(log_url) imports tab-separated events when the server serves text/plain TSV.

Build this without starting from a blank cell

Use a Better Sheets tool for IMPORTDATA, then watch a walkthrough when you want the full pattern.

Better Sheets resources

Common mistakes

  • Pointing at a Google Sheet view URL instead of a published CSV export link.
  • Building payroll logic on a feed that adds columns without versioning.
  • Ignoring charset issues when accented characters import as mojibake.
  • Stacking many IMPORTDATA calls on one recalc-heavy dashboard tab.
  • Assuming IMPORTDATA bypasses robots.txt or paywalls on private hosts.

Frequently asked questions

IMPORTDATA vs IMPORTRANGE?
IMPORTDATA reads CSV or TSV URLs. IMPORTRANGE links another Google spreadsheet by ID.
Can IMPORTDATA read JSON?
No. Use Apps Script or a third-party connector for JSON endpoints.
Why #REF! on IMPORTDATA?
The URL may be down, blocked, or returning HTML error pages instead of CSV.
Does IMPORTDATA detect delimiter?
Google parses common comma and tab formats. Odd separators may need manual SPLIT cleanup.
Can I filter IMPORTDATA?
Yes. Wrap with QUERY or FILTER on the spilled range.
IMPORTDATA and large files?
Very large files may time out or slow the sheet. Consider scheduled imports via script.
How often does it update?
On recalc with Google fetch limits, similar to other import functions.

Related Tutorials

Watch how IMPORTDATA works

Browse more tutorials
How to Download a Sheet as a CSV with a URL only

How to Download a Sheet as a CSV with a URL only

So you want to download a Google Sheet as a CSV. Let's do it!
How Do I Make a CSV File? And give a link to someone instead of the csv.

How Do I Make a CSV File? And give a link to someone instead of the csv.

Create a link to your sheet that immediately download the sheet as a CSV...

Related blog posts

Guides that explain IMPORTDATA in more depth.

Browse the blog

Related glossary terms

Done reading about IMPORTDATA?

Membership unlocks 636+ tutorials, unlimited generators, and every template. Practical lessons. Zero fluff.

Need this once

Jump to a free tool or a single tutorial for this topic.

Learning Sheets for real

Unlock the full library, generators, and templates with membership.