CSV Editor online

Code

Export

My documents

Click a document to open it. They are stored only in this browser - nothing is uploaded. Clearing the browser's site data removes them, so download the ones you want to keep.

AI Assistant

Any AI can work with you - ChatGPT, Claude, Gemini, Copilot.

  1. Click Copy prompt.
  2. Paste it into your AI and say what it should do with the table.
The AI should

The table travels in the link after the “#”, which no server sees. What you paste into your AI is handled by its provider.

Save to your server

The editor can send each saved version to your own server (a webhook), so your work is kept where you want it. Nothing is sent until you enter an address here.

What your server receives

A POST request with JSON (your server must allow CORS from https://csv.giit.ch):

{ "editor": "csv", "event": "save", "id": "…", "name": "Products",
  "content": "SKU,Product,Price\nA-100,Notebook,4.50\n",
  "updated": "2026-01-15T09:30:00.000Z" }
Embed the editor in your website
<iframe src="https://csv.giit.ch/?embed=1" style="width:100%;height:80vh;border:0"></iframe>
<script>
const frame = document.querySelector('iframe');
addEventListener('message', e => {
  if (e.origin !== 'https://csv.giit.ch' || e.source !== frame.contentWindow) return;
  if (e.data.type === 'csveditor:ready')
    frame.contentWindow.postMessage({ type: 'csveditor:load', name: 'Products',
      content: 'SKU,Product,Price\nA-100,Notebook,4.50\n' }, 'https://csv.giit.ch');
  if (e.data.type === 'csveditor:save') saveOnYourServer(e.data.content);
});
</script>

Also possible: ?src=<URL of a .csv file> opens a file, &webhook=<URL> saves this document there. The editor can also open in a window of its own (?embed=window), and your page can hand it its own AI prompt and a session key so the AI sends its result to your server (csveditor:ai, csveditor:key-request) - see "Use the editor on your own website" below the editor. Details are in llms.txt.

Help

How it works

  1. Open a CSV file, drop it into the window, or start with New. The raw text is on the left, the table in the middle.
  2. Edit cells in the table like in a spreadsheet: type, or press Enter or F2, or double-click a cell. Enter or Tab keeps the value, Escape cancels. The change goes into the CSV text right at that field - quotes only where needed, the line endings stay - and is one step for Undo.
  3. Copy and paste ranges between the table and Excel, LibreOffice or Google Sheets with Ctrl+C and Ctrl+V. Type into the row marked + to add a row.
  4. A click in the table puts the code's cursor on that field; the cursor in the code selects its cell.
  5. Sort with the arrows in the column heads and filter above the table: that only changes the view. Sort the data puts the rows of the file into that order.
  6. Format on the right sets how the text is read (separator, quote, header row) and converts it; Column shows what a column holds; Insert adds, deletes and moves rows and columns and cleans up.
  7. Problems (rows with another number of fields, unclosed quotes, empty or repeated header names) are listed above the code - click one to go there.
  8. Export makes an Excel workbook, JSON, Markdown, HTML, TSV or CSV with another separator. Download .csv saves the text as it is.

Keyboard shortcuts in the table

← → ↑ ↓, Shift + arrows
Move, select a range
Enter / F2 / typing
Edit the cell (typing replaces its value)
Alt + Enter
A line break inside the cell
Tab / Shift + Tab
Next / previous cell
Delete
Empty the selected cells
Ctrl + C / X / V
Copy / cut / paste (tab-separated, as spreadsheets use it)
Ctrl + A
Select the whole table
Ctrl + F
Filter the rows
Ctrl + Z / Y
Undo / redo
Ctrl + S / E
Save (download .csv, or to your server) / export
Ctrl + O
My documents
Ctrl + Enter in the code
Go to the cursor's cell in the table

CSV ファイルを表とテキストでオンライン編集

CSV エディターは、元の CSV と表を並べて表示します。表のセルを編集すると、エディターはテキストのそのフィールドだけを変更し、ほかの引用符、区切り文字、改行コードは元のまま残ります。表をクリックするとテキストのフィールドが示され、テキストのカーソル位置のセルが表で示されます。ショップ、銀行、データベースからのエクスポートの修正、住所録の整理、インポート用データの準備をすばやく行えます。

すべてブラウザー内で動作します。ファイルはアップロードされず、登録も広告もありません。

エディターでできること

表計算ソフトのように

セルに入力し、矢印キーと Tab で移動し、Excel、LibreOffice、Google スプレッドシートとの間で範囲をコピーと貼り付けし、行と列の追加、削除、移動ができます。

どんな CSV でも

区切り文字はカンマ、セミコロン、タブ、パイプを自動検出。ヘッダー行の有無、BOM 付き / なしの UTF-8 と Windows-1252 に対応し、Windows と Unix の改行コードは保持されます。

壊れた箇所を見つける

フィールド数の異なる行、閉じられていない引用符、空または重複した列名を行番号付きで一覧表示し、クリック 1 つで移動できます。

並べ替え、絞り込み、詳しく見る

ファイルに触れずに表示を並べ替えたり絞り込んだり、データ自体を並べ替えたりできます。列パネルには値の種類、空の値と異なる値の数、合計と平均が表示されます。

大きなファイル

表は見えている行だけを描画するので、10 万行のファイルでもスクロール、絞り込み、編集が軽快です。

エクスポート

Excel ブック (XLSX)、JSON、Markdown と HTML の表、TSV、または別の区切り文字とエンコーディングの CSV。表計算ソフトの数式からの保護付きです。

使い方

  1. 開く - CSV ファイルをウィンドウにドロップするか、「ファイルを開く…」で開くか、「新規」のテンプレートで始めます。
  2. 編集 - 表のセルまたは左側のテキストを変更します。両方が互いに追従します。行と列は「挿入」、区切り文字は「形式」で変更できます。
  3. 保存 - CSV をそのままダウンロードするか、XLSX、JSON、Markdown、HTML としてエクスポートします。

エディターを自分の Web サイトで使う

https のページ (および localhost) なら、<iframe> と ?embed=1 でエディターを埋め込めます。登録もキーも不要です。埋め込まれたエディターはこの説明文を隠し、保存ボタンを表示します。表を受け渡す方法は 2 つあります。

1. リンクからファイルを開き、自分のサーバーに保存する

src= でファイルを開き (サーバーで CORS の許可が必要)、webhook= を指定すると「保存」(Ctrl+S) でドキュメントがそのアドレスに送信されます。&token=… を付けると Authorization: Bearer … ヘッダーが付き、&auto を付けると変更のたびに保存します。

<iframe src="https://csv.giit.ch/?embed=1&src=https://your-site.com/data/products.csv&webhook=https://your-site.com/save.php"
        allow="clipboard-write" style="width:100%;height:800px;border:0"></iframe>

Webhook は JSON { editor: "csv", event: "save", id, name, content, updated } を含む POST を受け取ります。それを保存する小さな PHP スクリプト:

<?php
header('Access-Control-Allow-Origin: https://csv.giit.ch');
header('Access-Control-Allow-Headers: Content-Type, Authorization');
header('Access-Control-Allow-Methods: POST, OPTIONS');
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') exit;
if (($_SERVER['HTTP_AUTHORIZATION'] ?? '') !== 'Bearer SECRET') { http_response_code(403); exit; }
$d = json_decode(file_get_contents('php://input'), true);
$name = preg_replace('/[^\w\- ]/u', '_', $d['name']);
file_put_contents(__DIR__ . "/data/$name.csv", $d['content']);
echo '{"ok":true}';

2. ページがドキュメントを保持する (postMessage)

エディターが csveditor:ready を送り、ページが csveditor:load で応答すると、エディターは csveditor:loaded を返し、実際に編集されると csveditor:change、ユーザーが保存すると csveditor:save を送ります。ページからは csveditor:get (現在の状態) や csveditor:save (保存ボタンを押す) を送れます。保存はあなた自身のログインとセッションを通して行われます。

<iframe id="ed" src="https://csv.giit.ch/?embed=1" allow="clipboard-write" style="width:100%;height:800px;border:0"></iframe>
<script>
const ed = document.getElementById('ed');
const ORIGIN = 'https://csv.giit.ch';

addEventListener('message', async e => {
  if (e.source !== ed.contentWindow || e.origin !== ORIGIN) return;
  const m = e.data;
  if (m.type === 'csveditor:ready') {               // エディターの準備完了: ドキュメントを渡す
    ed.contentWindow.postMessage({
      type: 'csveditor:load',
      name: 'Products',
      content: await (await fetch('/data/products.csv')).text()
    }, ORIGIN);
  }
  if (m.type === 'csveditor:change') document.title = '● not saved';   // 実際の編集
  if (m.type === 'csveditor:save') {                // ユーザーが「保存」をクリックした
    await fetch('/api/save', { method: 'POST', headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({ name: m.name, content: m.content }) });
    document.title = 'Saved';
  }
});

// 自分のページの保存ボタン: 応答は csveditor:save として届く
function saveNow() { ed.contentWindow.postMessage({ type: 'csveditor:get' }, ORIGIN); }
</script>

ページ内の AI アシスタント: フレーム内でも動作します。iframe に allow="clipboard-write" を付けると、「プロンプトをコピー」がクリップボードを直接使います (付けない場合は古いコピーコマンドを使うか、手動でコピーできるようプロンプトを表示します)。AI が送るリンクはほかの Web サイト内のエディターには届かないため、エディターは AI とユーザーに、代わりに AI の回答全体をエディターに貼り付けるよう案内します。または、エディターを専用のウィンドウで開いてください。

3. 専用のウィンドウで開く

window.open("https://csv.giit.ch/?embed=window", "csveditor-17") は完全なエディターを専用のウィンドウで開き、window.opener と同じメッセージをやり取りします。AI からのリンクもそこに届きます。csveditor:load には context: { host, title, rules } (AI プロンプトがドキュメントの所属先を伝え、あなたのルールに従います) と hook: { url, token } (このドキュメント専用で保存されない Webhook) も含められます。未保存の変更があるままウィンドウを閉じると csveditor:closing が送られます。

4. 自分のサーバー経由の AI

エディターに独自のプロンプト、サイト上のアドレス、このエディターセッション用のキーを渡します。すると AI ダイアログには、あなたのサイトへの「接続先」、AI に伝える内容、そして 現在のドキュメントを変更 か 新しいドキュメントを作成 の選択肢が表示され、プロンプトをコピー ですべてがまとめられます。AI はキーを付けて結果をあなたのサーバーに送り、ページがそれをエディターで開きます。新しいドキュメントは別に開き、ユーザーのブラウザー内に残ります。キーはエディターセッションごとに 1 つです。エディターを開いている間は有効で、キーがないときだけエディターが csveditor:key-request で要求します。エディターがキーを自分で送ったり保存したりすることはありません。アドレスはあなた自身のホストまたはそのサブドメイン上の https である必要があります。

const key = async () => (await fetch('/api/ai-key.php?doc=17')).json();   // エディターセッションごとにキーを 1 つ
const k = await key();
ed.contentWindow.postMessage({ type: 'csveditor:load', name: 'Products', content, ai: {
  label: 'My Site', prompt: 'Keep the column names. Prices in CHF.',
  endpoint: 'https://your-site.com/api/ai-result.php', key: k.key } }, ORIGIN);
// csveditor:loaded の id を覚えておき、別の id の change/save/closing は無視する
// エディターにキーがないときだけ:
if (m.type === 'csveditor:key-request') { const k = await key(); ed.contentWindow.postMessage({ type: 'csveditor:ai', key: k.key }, ORIGIN); }
// エディターを開いている間、毎分サーバーに知らせる。エディターまたはページを閉じるとキーは無効になる
setInterval(() => fetch('/api/ai-key.php?alive=' + k.key.slice(0, 8)), 60000);
// サーバーに結果がある (ポーリング、SSE …): target は "current" または "new"
ed.contentWindow.postMessage({ type: 'csveditor:load', name: 'Products', content: draft, from: 'ai', target }, ORIGIN);

キーは 128 ビット以上のランダム値で作り、ハッシュだけを保存し、それぞれをログイン中のユーザー、ドキュメント、このエディターセッションに結び付けてください。キーはセッションごとに 1 つ作り、ページがセッションを開いていると報告している間だけ有効にし、エディターまたはページが閉じたら無効にしてください。

プロトコルの全体は llms.txt にあります。AI に渡せば、あなたのシステム用の接続を作ってくれます。ほかの giit エディターも、それぞれの接頭辞で同じように動作します。たとえば LaTeX エディターは latexeditor: です - latex.giit.ch。

よくある質問

CSV ファイルはアップロードされますか?

いいえ。エディターは完全にブラウザー内で動作します。自分で自分のサーバーへの Webhook を設定しない限り、ファイルがサーバーに送られることはありません。

セルを 1 つ編集すると、エディターはファイルを変更しますか?

そのセルだけです。エディターは変更を CSV テキストのそのフィールドの位置に書き込み、残りは元のままにします。ほかの引用符、区切り文字、改行コードは残ります。フィールドを引用符で囲むのは必要なときだけです。

CSV がセミコロン区切りでも使えますか?

はい。エディターは区切り文字としてカンマ、セミコロン、タブ、パイプを検出します。形式 で選ぶこともできます。変換 でファイルを別の区切り文字に変えられます。

文字化けせずに CSV を Excel で開くには?

XLSX としてエクスポートするか、バイトオーダーマーク (BOM) 付きで CSV をダウンロードしてください。形式 でチェックを入れるか、エクスポートで「BOM 付き UTF-8」を選びます。そうすると Excel が UTF-8 を正しく読み込みます。

大きなファイルも扱えますか?

はい。表は見えている行だけを描画するので、10 万行のファイルでもスクロール、絞り込み、編集が軽快です。

ドキュメントはどこに保存されますか?

ブラウザー内だけです。左上のフォルダーボタン (マイドキュメント) をクリックすると、開く、名前の変更、複製、ダウンロード、削除ができます。ブラウザーのサイトデータを消去すると削除されるので、残したいものはダウンロードするか、エディターから自分のサーバーに送ってください (「サーバーに保存」)。非常に大きなファイルはブラウザーの保存領域に収まらないことがあり、その場合はエディターがお知らせします。

AI に CSV エディターで書いてもらえますか?

はい、どの AI でも使えます。ChatGPT、Claude、Gemini、Copilot、またはコーディングツールの AI です。「AI アシスタント」、続いて「プロンプトをコピー」をクリックし、AI に貼り付けて何をするか伝えてください。AI はリンクで回答します。クリックすると表がエディターに表示されます。「元に戻す」ですべての変更を戻せます。

CSV エディターは有料ですか?

いいえ。エディターは無料で、広告も登録もありません。