We introduce a technique to automatically convert local boundary conditions into nonlocal volume constraints for nonlocal Poissons and peridynamic models. The proposed strategy is based on the approximation of nonlocal Dirichlet or Neumann data with a local solution obtained by using available boundary, local data. The corresponding nonlocal solution converges quadratically to the local solution as the nonlocal horizon vanishes, making the proposed technique asymptotically compatible. The proposed conversion method does not have any geometry or dimensionality constraints and its computational cost is negligible, compared to the numerical solution of the nonlocal equation. The consistency of the method and its quadratic convergence with respect to the horizon is illustrated by several two-dimensional numerical experiments conducted by meshfree discretization for both the Poissons problem and the linear peridynamic solid model.