---
title: "TypoScript coding guidelines"
manual: "TYPO3 Explained"
version: "12.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:cgl-typoscript@12.4"
source: "CodingGuidelines/CglTypoScript/Index.rst"
rendered: "2026-10-21T15:29:37+00:00"
---

# TypoScript coding guidelines {#cgl-typoscript}

## Directory and file names {#directory-and-file-names}

<!-- TODO: no Markdown rendering for "versionchanged" -->

Support for other TypoScript file extensions, such as .txt or
.ts, has been removed in TYPO3 v12.

-   The file extension **must** be `.typoscript`.
-   TypoScript files are located in the directory
    `<extension>/Configuration/TypoScript`.
-   File name for constants in static templates: `constants.typoscript`.
-   File name for TypoScript in static templates: `setup.typoscript`.

## Format {#format}

-   Use spaces, not TABs.
-   Use 2 spaces per indenting level.

## More information {#more-information}

-   See [Setup IDE / editor](https://docs.typo3.org/permalink/t3coreapi:cgl-ide@12.4) in this manual for information about setting up your
    editor / IDE to adhere to the coding guidelines.
