[](https://js.langchain.com/docs/how_to/code_splitter/): LLM should read this page when trying to split code in a programming language into chunks, when working with code in different formats like HTML or Markdown, when needing to split text while preserving code structure and syntax. This page explains how to use the RecursiveCharacterTextSplitter to split code in various programming languages like JavaScript, Python, Markdown, LaTeX, HTML, Solidity, and PHP into chunks while respecting code structure and syntax.

