We propose an exact simulation scheme for the first hitting time of Brownian motion. Our method is applicable to expanding boundaries, which are linear or piecewise linear. We first develop an algorithm for symmetric linear boundaries, and then extend it to other boundaries using a localization technique. The extended algorithm iteratively invokes a symmetric-case algorithm, and we prove that the expected number of iterations is uniformly bounded. We apply our scheme to simulate the first hitting time of a Brownian bridge.(c) 2022 Published by Elsevier B.V.