## TL;DR

HCL does not use semicolons. If you wrote `variable "x" { type = string; default = "y" }` on one line, Terraform rejects the `;`. Put each argument on its own line and the error goes away.

## The error

```text
Error: Invalid character
The ";" character is not valid. Use newlines to separate arguments and blocks
```

## Steps to fix

1. Open the file and line the error names. Look for `;` separating arguments on one line.
   - Expected: you find the single-line block with semicolons.
2. Expand it to one argument per line:
   ```hcl
   variable "common_tags" {
     type    = map(string)
     default = {}
   }
   ```
   - Expected: no semicolons remain in the block.
3. Run `terraform fmt` to normalize the file, then `terraform validate`.
   - Expected: `Success! The configuration is valid.`

## When to use this

- `terraform validate`/`plan` fails with `Invalid character` pointing at `;`, backticks pasted from markdown, or other stray characters, right after writing or pasting config.

## When NOT to use this

- `Missing newline after argument` is the sibling syntax error (different message). If the invalid character is invisible, suspect smart quotes or zero-width characters from copy-paste and retype the line.

## Compatibility

- All Terraform versions; HCL syntax rules are stable.

## Root cause

HCL's native syntax separates block arguments with newlines, not semicolons. People coming from JSON, Python, or C-style languages write one-line blocks with `;` separators out of habit, and the HCL parser rejects the character outright.

## Edge cases

- Backticks accidentally pasted from markdown code fences produce the same error naming the backtick character; rewrite the file from the terminal to be safe.
- `$var.name` without braces (shell-style) is a different error (`Invalid character` naming `$`); use `${var.name}` inside quotes.
- `terraform fmt` fixes indentation but does not remove semicolons; you must edit them out.