--- description: | Packer templates are configuration files that determine Packer behavior. Learn about the Packer template configuration language. page_title: Packer templates reference overview --- # Packer templates reference overview This topic provides overview information about Packer templates, which are configuration files that determine Packer behavior. ## Introduction A Packer template contains a series of declarations and commands for Packer to follow. Templates define the following instructions for Packer: - Which plugins, such as builders, provisioners, and post-processors to use - How to configure the plugins - In what order to run them The template contains flexible variable injection tools, as well as built-in functions to help you customize your builds. ## Template language Packer supports templates written in [HCL2](/packer/docs/templates/hcl_templates) or [JSON](/packer/docs/templates/legacy_json_templates). Since v1.7.0, HCL2 is the official format for Packer configurations. HCL2 is also the configuration language used in configurations for other HashiCorp products, such as Terraform. HCL is more flexible, modular, and concise than the JSON template format. Refer to [Upgrade Packer JSON template to HCL2](/packer/tutorials/configuration-language/hcl2-upgrade) for a tutorial on upgrading JSON templates to HCL templates.