diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..9d60c29f
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,25 @@
+# SPDX-License-Identifier: CC0-1.0
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.{cpp,h}]
+indent_size = 8
+indent_style = tab
+
+[*.py]
+indent_size = 4
+indent_style = space
+
+[*.xml]
+indent_size = 2
+indent_style = space
+
+[{meson.build,meson.options,meson_options.txt}]
+indent_size = 2
+indent_style = space
