TikZ in standalone not centering

It's the end of line after the \tikzstyle declaration. Move it before \begin{document}.

By the way, \tikzstyle is deprecated and I changed it to the currently preferred format.

\documentclass{standalone}

\usepackage[showframe,pass]{geometry}
\usepackage{tikz}
\usetikzlibrary{positioning}

\tikzset{
  b/.style = {
    rectangle,
    draw,
    node distance=2.6cm,
    text width=6em,
    text centered,
    rounded corners,
    minimum height=8em,
    minimum width=6em,
    thick,
    font=\small,
    fill=black!10,
  },
}

\begin{document}


\begin{tikzpicture}[auto]

\node [b] (1) {block 1 \\ block 1};
\node [b, right of=1] (2) {block 2 \\ block 2};
\node [b, right of=2] (3) {block 3 \\ block 3};
\node [b, right of=3] (4) {block 4 \\ block 4};
\node [b, right of=4] (5) {block 5 \\ block 5};


\node [b, below = 2mm of 1] (6) {block 6 \\ block 6};
\node [b, below = 2mm of 2] (7) {block 7 \\ block 7};
\node [b, right of=7] (8) {block 8 \\ block 8};
\node [b, right of=8] (9) {block 9 \\ block 9};

\draw[-, thick] (1)--(2)--(3)--(4)--(5);
\draw[-, thick] (2)--(7)--(8)--(9)--(4);

\end{tikzpicture}

\end{document}

enter image description here


use

\documentclass[tikz]{standalone}

and it will delete the trailing space.

enter image description here