空白削除ツール

不要な空白と空行を削除してテキストを整えます。

// about

ツールについて

テキストやコードに含まれる余分なスペース、タブ、不要な空行を一度に綺麗に削除します。文書が見やすくなり、データ容量も削減できます。

使い方

  1. 整頓したいテキストを入力ボックスに貼り付けます。
  2. 「空行の削除」などのオプションを確認します。
  3. 「実行」を押して整形されたテキストをコピーします。

このツールが使われる理由

  • 重複したスペースや余分な改行を一瞬で整理します。
  • ウェブサイトやPDFからコピーした崩れた文章の整頓に便利です。
  • 手動でスペースを消す手間を大幅に省けます。

よくある質問 (FAQ)

単語間の通常のスペースまで消えてしまいますか?

いいえ。連続した不要なスペースのみを整理し、単語間の1スペースは保持されます。

プログラムコードの整理にも使えますか?

はい!コードの無駄な改行や末尾のスペース削除に最適です。

貼り付けできる文字数に制限はありますか?

長文の文章や大量のテキストデータもスムーズに処理できます。

ガイド · データ · 4分で読めます

CSVとJSONの違い:使い分けと変換時の注意点

表計算ソフトの書き出しをAPIに送ったり、APIのレスポンスをExcelで開いたりするには、CSVとJSONの変換が必要です。形式の違いを知っておけば、途中でデータが壊れるのを防げます。

CSV(Comma-Separated Values)は表です。1行目に列名があり、続く各行がレコードで、値はカンマで区切られます。どの行も同じ列を持つ平らなデータを保存する、最も単純で軽い方法です。

name,city,score
Kim,Seoul,92
Lee,Busan,85

[
  {"name": "Kim", "city": "Seoul", "score": 92},
  {"name": "Lee", "city": "Busan", "score": 85}
]
CSVとJSONの構造の違い、ExcelでUTF-8のCSVが文字化けする理由、カンマや引用符のエスケープ規則、入れ子のデータを平らにする方法を解説します。
ガイドを読む →
AIで作る

このツールをAIで自作してみましょう

自分用のバージョンが必要なら、作業指示プロンプトをAIチャットに貼り付けるか、スキルファイルをAIコーディングエージェントに保存してください。私たちが開発時に整理した機能、例外、テストケースが含まれています。

プロンプトとスキルは英語で提供しています。AIツールはどの言語でもよく理解できます。

AI作業指示プロンプト

Claude、ChatGPT、GeminiなどのAIチャットにそのまま貼り付けてください。

You are an experienced full-stack web developer. Build a web tool called "空白削除ツール" that meets the requirements below.

## Goal

Build a tool that cleans up extra spaces, blank lines and line breaks in text.

## Core features

- Trim leading and trailing spaces
- Collapse repeated spaces
- Remove blank lines
- Join lines with spaces
- Handle tabs, non-breaking spaces and full-width spaces

## Inputs

- Text to clean
- Checkboxes for each rule

## Outputs

- Cleaned text
- Number of characters removed

## Edge cases and handling rules

- Option to preserve indentation for code
- Mixed CRLF and LF line endings
- Option to remove zero-width spaces (U+200B)
- Performance on very long text

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- '  a   b  ' becomes 'a b'
- Removing blank lines leaves none
- Non-breaking spaces become normal spaces

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

スキル (SKILL.md)

Claude CodeなどのAIコーディングエージェントで .claude/skills/build-whitespace-remover/SKILL.md に保存すると、このツールを作る・直すたびに再利用できます。

---
name: build-whitespace-remover
description: Use when building or changing a 空白削除ツール tool. Build a tool that cleans up extra spaces, blank lines and line breaks in text.
---

# Build: 空白削除ツール

## Goal

Build a tool that cleans up extra spaces, blank lines and line breaks in text.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- Trim leading and trailing spaces
- Collapse repeated spaces
- Remove blank lines
- Join lines with spaces
- Handle tabs, non-breaking spaces and full-width spaces

## Inputs

- Text to clean
- Checkboxes for each rule

## Outputs

- Cleaned text
- Number of characters removed

## Rules

- Option to preserve indentation for code
- Mixed CRLF and LF line endings
- Option to remove zero-width spaces (U+200B)
- Performance on very long text
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] '  a   b  ' becomes 'a b'
- [ ] Removing blank lines leaves none
- [ ] Non-breaking spaces become normal spaces

AIに任せるときのコツ

  • 最初の行に使用技術(React、Vue、素のHTMLなど)を書くと、プロジェクトに合ったコードになります。
  • コードを受け取る前に、テストケースを実行して結果を見せるよう依頼しましょう。
  • 本物のパスワード、顧客データ、APIキーは入力せず、サンプル値を使ってください。